Is anyone know how to use get text & data scraping together and insert into Excel?
What I want to show in my Excel is those highlighted in Blue, i was able to get the datatable using Data Scraping but i cant get the “104445” together.
Is anyone know how to use get text & data scraping together and insert into Excel?
What I want to show in my Excel is those highlighted in Blue, i was able to get the datatable using Data Scraping but i cant get the “104445” together.
What you have is a combination of tabular data in your PDF, and property-type data where the information comes in name-value pairs.
Is anyone know how to use get text & data scraping together and insert into Excel?
You've got the first part working. Now just add new activities to your process or workflow that will extract the text after the tabular data is extracted. Hold the specific data fields in variables, and then just use the Excel activities to write the DataTable and information held in variables into the spreadsheet. Append Range
and Write Cell
Excel activities will likely do the trick.
The UiPath data scraping functions are perfect for the tabular data. As you have discovered, it brings everything back as a DataTable
. The individual pieces of data require more fine grained data extraction.
For the 104445, you will need to use the get Text
function, in combination with the Anchor Base
function.
Anchor Base
function onto the page. The Anchor Base
requires two activities to be added in order for it to work.get Element
. This will specify the label to the left of 104445.get Text
activity to retrieve the text next to the get Element
activity. This will extract the 104445.In the following UiPath Anchor Base
example, the label is above the text I want to extract so the Anchor Base
activity sets the anchor location to be above the text to extract. In your example, you would set the UiPath Anchor Base activity to indicate that the anchor is to the left of the text to extract.
By the way, you can use the PDF get Text
activity alone without the Anchor Base
activity, but it likely won't work if you need to extract data from multiple PDFs, as the UiPath selector will be too specific. If you need to loop through multiple PDF files, you'll want to use the Anchor Base
activity.
Just a note to anyone else looking at this answer. For the data scraping and get text activities to work, the PDF must be tagged. If the properties indicate that PDF is not tagged, these features will not always work as advertised. Furthermore, if the PDF is really just a scanned image, you will need to use UiPath OCR facilities. The data scraping and get text activities won't work at all.
Also, in order to get the data scraping or get text activities to work propertly, you many need to change the reading order property of the Adobe or FoxIt reader to infer or tagged.