Hum-hum-hum..., OK-OK indeed..., but hum..., several "Things" are or can be playing a Role...:
1- 'PROMPT' is maybe not the best "Tool" to debug and inspect/control the "exact" Content of 'EXTRACT' on a 'TABLE' Element, because that 'EXTRACT' contains "a lot" of Double Quotes, and 'PROMPT' tries to interpret those, usually as the Delimiter of a String (that might contain some Spaces in it) and won't display the "Outer" Double Quotes enclosing that String.
And this is for example visible I think in:
Code: Select all
Full_Table:
_ଖତିୟାନର କ୍ରମିକ ନଂ : 1","ମୌଜା : ଉପରହରିଡ଼ାବାଡ଼ି","ଜିଲ୍ଲା : ଗଂଜାମ"
[...]
"3 plots","","","0","459","","_
I would expect 1 or maybe 2 Double Quotes at the very beginning just after the '_' that I always use as Delimiter to display a 'PROMPT'.
No real big deal in your Case, as you actually cut that Content after the ["12"], so you don't really care about the beginning of the 'EXTRACT', but still, this is not exactly the Behaviour I would have expected...
And you can see for the last Row in the 'PROMPT', => [...,"0","459","","_], you do get a "final"/"orphan" Double Quote at the very end, but then I'm a bit surprised by the Comma just before it, because you didn't get a Comma after the ["12"], I would have rather expected [...,"0","459","""_] in the 'PROMPT'..., => with 3 Double Quotes together, =2 for the last Cell, which happens to be Empty, and +1 for enclosing the whole Table...
2- The "Purpose" of an 'EXTRACT' on a 'TYPE=TABLE' Element is "meant" to be combined with a 'SAVEAS TYPE=EXTRACT' to save that Data/Table to a '.CSV' File that in return is meant to be opened in 'Excel' (or your corresponding Software Prog from 'OO' or 'LO' ('OpenOffice' or 'LibreOffice') where you'll need to make sure to select the "correct" Settings for Delimiter + Separator(s) for the Data that will decide how the Data finally gets displaid in 'Excel'.
I don't see in your (long) Script what you are further doing with that extracted and cut and cleaned Data... What do you do with it...?
3- Oh ja...!, related to '1-' and that 'PROMPT' is maybe not the best Tool to use to inspect the Content of 'Table_Data', the "best" Way to inspect/check that Data in a "raw State" and to make sure that iMacros with the 'PROMPT' Command, or the Browser is not trying to interpret some HTML/CSS Formatting, is to save that Data with 'SAVEAS TYPE=EXTRACT' to a '.CSV' or '.TXT' File, and to open that File in 'Notepad'... (And not in 'Excel', even if you saved it as '.CSV' and probably have the '.CSV' File Extension associated with 'Excel'.)
That's the only Way to check the raw Content... Even if the 'SAVEAS' Command still plays a Role in the Process, and behaves differently in different Versions of iMacros and with different Browsers... iMacros for FF v8.9.7 adds Double Quotes around every Cell and the whole Table in the 'EXTRACT' and 'SAVEAS', while you don't get any Double Quotes, or maybe only for the whole Table, in other Browsers... (And you then need to choose different Settings when you want to open the '.CSV' in 'Excel'...)
4- The 'EXTRACT' Mechanism on a 'TABLE' Element is rather "meant" for "simple"/"normal"/"standard" HTML Tables, made of a 'TBODY' + 1 'TH' (Table Header) + several 'TR' (Table Rows) with several 'TD' (Cells) all containing some "raw" Text, and you can quickly get some "unexpected" Results with "complex" or "fancy" Tables like in your Case, where for example the Cell containing the "459" is a "Standard"/fairly simple Cell:
Code: Select all
<td style="border-color: #000000">459</td>
... but if you take for example the Cell from Col_9 containing "ଉ: ନିଜ + ଦ: ପତିତ" (displaid on 2 Rows within the Cell), this one is defined by:
Code: Select all
<td style="font-size:17px;width:500px;border-color: #000000" align="center">
<span id="gvRorBack_ctl07_lblKisama" class="line" style="color:#000000;font-size:14px;"></span>
<span id="gvRorBack_ctl07_lbln_occu" class="line" style="color:#000000;font-size:14px;">ଉ: ନିଜ</span>
<span id="gvRorBack_ctl07_lble_occu" class="line" style="color:#000000;font-size:14px;"></span>
<br>
<span id="gvRorBack_ctl07_lbls_occu" class="line" style="color:#000000;font-size:14px;">ଦ: ପତିତ</span>
<br>
<span id="gvRorBack_ctl07_lblw_occu" class="line" style="color:#000000;font-size:14px;"></span>
</td>
... => 5x 'SPAN' Elements + 2x '<BR>' Tags, and all those Elements and Formatting inside 1 single Cell...! And 3 of the 'SPAN' Elements are not even used and are Empty...! Then, tja...!, no wonder that iMacros then has some "Difficulties" trying to extract that "Cell". It's already nearly a "Miracle" that it manages to extract the Text Content, but don't be surprised to also get a lot a Spaces and Soft/Hard Returns with that Text...!
=> If you want the Data to be more "clean" than the 'EXTRACT' Mechanism can get on a 'TYPE=TABLE' Element, I'm "afraid" you'll have to extract that Data Cell by Cell (*), where using 'EVAL()', you'll then be able to "clean" the Data with 'trim()'. But even that might not be "enough", because "extracting Cell by Cell" means extracting at the 'TD' Level, and 'trim()' will only remove the Spaces and Tabs/Returns at the beginning + end of the Cell, but for the Example about the "ଉ: ନିଜ + ଦ: ପତିତ" Cell, you may still get some Spaces defined at the Sub-Level of the 'SPAN' Elements, and for sure the 2x '<BR>' Hard Returns, so you would even need to go one Level deeper in the HTML Structure of that/some Cell(s) and to extract at the 'SPAN' Level, and this whole Process, just for 1 Cell...!
+ You will probably need to loop your Script to handle 1 Row per Loop... You could hard-code 10 Blocks if you expected Max 10 Rows per Page/Table, but you mentioned that some Pages could contain 100's of Rows
, so hard-coding 1 Block per Row would not be workable in your Case, then maybe you'll have to convert your '.iim' Script to a '.js' Script where you could loop per 1 Row/1 Block, depending on the Length and how many Rows on a Page...
5- (*) And before you ask, in case you get the Idea, ah-ah...!
, there is no Mechanism to extract a Full Row in one Go...
Of course you can extract a "TYPE=TR" Element, but hum.., 'EXTRACT=TXT' will give you the whole Text Content of the whole Row in just 1 Block of Data, all Formatting gets lost, you would get for example for your "easy" last Row "3 plots0459", all Data gets concatenated in just 1 String, without any Separator, you then need to use 'EXTRACT=HTM', but pfff..., you are then a bit on your own, and you then need to re-code from scratch the whole 'EXTRACT' Mechanism from that HTML Source for a whole Row, which is already not very easy for a "simple"/"standard" Table, but will be a complete pain in the ass in your Case, with the Cells with 5x 'SPAN' Elements...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...