Extract Structured Data with Input values

Hi everyone,

I’m struggling trying to extract data from a Data Table. The things is I get the table empty because the “td” tags are empty. The data are inside an input tag with value attribute and UiPath can’t get that value with normal configuration. I’ve tried to change the ExtractMetadata field, but I don’t know how to do it.

The thing is:

I have an input tag inside td, and those are the values I need. How do I put it in the ExtractMetadata field to get those values?

This is the table I have:

And this is the ExtractMetadata UiPath gives me (but the values are all empty):

< extract-table get_columns_name=‘1’ get_empty_columns=‘1’ columns_name_source=‘Longest’>
< column name=‘#’ attr=‘text’ />
< column name=‘Nombre’ attr=‘text’ />
< column name=‘Descripción’ attr=‘text’ />
< column name=‘Perímetro’ attr=‘text’ />
< column name=‘Tipo’ attr=‘text’ />
< column name=‘Cantidad’ attr=‘text’ />
< column name=‘Column-6’ attr=‘text’ />
< /extract-table>"

I’ve tried changing it, adding “row” and “webctrl” with input, but didn’t work because obviously I don’t know how that works to match my needs.

If you have any idea, it would be appreciated.

Thank you so much in advance.

have a look here:
[HowTo] Data Scraping - Advanced Configuration - Text Field, Image Source, Url, CSS Classname, Hover text - News / Tutorials - UiPath Community Forum

Hi Peter,

Yeah, I saw that topic and tried, but… it didn’t work. This is my attempt:

< extract>
< row exact=‘1’>
< webctrl tag=‘tr’ />
< /row>
< column name=‘Tipo’ attr=‘value’ exact=‘1’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘5’ />
< webctrl tag=‘input’ idx=‘5’ />
< /column>
< column name=‘Tipo’ attr=‘value’ exact=‘1’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘6’ />
< webctrl tag=‘input’ idx=‘6’ />
< /column>
< /extract>

then it is recommended to share

  • what was done in detail?
  • what is failing in detail?

Also, let us know if was it done with classic or modern Table Extraction?

Hi Peter,

I don’t know what you expect about “what was done”. It’s the activity Extract Structured Data. It’s not failing, it just returns an empty DataTable (no columns, no cells, just “”).

I used classic activity. I tried with modern, but same result, so I stayed with classic (all’s been developed with classic activities).

we are expecting so much info, so that we derive on what was implemented so far and how.

refereing to your snippet

we also would doubt the idx=‘6’ for the input field.

in the 6th column (Tipo) there is 1 input field (we rerer to your screenshot), the idx should be different (e.g. 1)

Also feel free to share with us the HTML snippet as Textfile

Hello again Peter,

Thank you so much for your answers. Please find attach the HTML snippet. Also, I managed to somehow extract the data table, following all instructions again from the previous post you sent, but not quite all fields I need because ONE of those fields is a Select-Option, so when I try to extract the text, I get all three options I have, but I need the one as “selected=‘selected’” in option attribute (this is too much, sorry). Here is the metadata I used:

< extract>
< row exact=‘1’>
< webctrl tag=‘tr’ />
< /row>
< column exact=‘1’ name=‘Column1’ attr=‘value’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘input’ idx=‘1’ />
< /column>
< column exact=‘1’ name=‘Column2’ attr=‘value’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘2’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘input’ idx=‘1’ />
< /column>
< column exact=‘1’ name=‘Column3’ attr=‘value’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘3’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘input’ idx=‘1’ />

< column exact=‘1’ name=‘Column4’ attr=‘value’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘4’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘input’ idx=‘1’ />
< /column>
< column exact=‘1’ name=‘Column5’ attr=‘text’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘5’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘select’ idx=‘1’ />
< webctrl tag=‘option’ />
< /column>
< column exact=‘1’ name=‘Column6’ attr=‘value’>
< webctrl tag=‘tr’ />
< webctrl tag=‘td’ idx=‘6’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘p’ idx=‘1’ />
< webctrl tag=‘div’ idx=‘1’ />
< webctrl tag=‘input’ idx=‘1’ />
< /column>
< /extract>

One more thing: is it really necessary to have all those tags to get to the last one? Because if one of them changes, then… this will be for nothing, right?
HTML Snippet.txt (22.5 KB)

Again, sorry for this inconvenience and thank you for your help, really appreciated.

Regards,
Ángel

Hi everyone.

Finally it was that difficult to extract with all html tags that I finally extracted the data I needed (just two columns) with “get text” activity and made a table out of those two columns, instead of extracting all table with all those html tags.

I think it’s best like that, because if any html tag dissapears or changes, then the activity won’t work.

Thanks to everyone who posted to help me.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.