Hi, I need to extract the data from a pdf file and add it to the excel as each row and column as it is in PDF. I use get full-text activity where I am getting an overall data of pdf how could I split it. Can anyone help me? I have attached the Pdf file and data that got from extracted data.
inv2.pdf (39.7 KB).
How do you want to split the data. Line by line?
You can use REGEX or String manipulation methods to retrieve required data from PDF file and then pass it to excel file to write into it.
Thanks for Your Reply,
Can you guide me in Regex and String I am not that much familiar in both
-
first you split the whole string based on the newline char
-
then you will get a array of item(each line as a item)
-
then take the line 6 (from top) and split it based on the space, which give the
column of the table (use add column activity to add the headers of the table) -
same as above take the 7 item from the main array extract the values using regex then put the values into respective place
for remaining values , it is simply split and get the values.
Thnkas Vishal For your reply,
Yes I need to Split Line by Line
Thanks for your Reply,
Could you give me an example
Try like the following, create a string array variable as arrOutput. And get is assigned with the following code in assign activity.
Here strInput is your input string.
Strinput.split({environment.newline}, stringsplitoption.none)
Thanks for your Reply,
could you say me what should be variable type because stringsplitoption is not getting highlighted
Strinput.split({environment.newline},StringSplitOptions.None)
Try this
Thanks for your reply…
But i want to know what is the variable type should i give for strinput. I used String but stringsplitoptions is not getting highlighted
@soumi_soumiya
StringSplit.xaml (5.8 KB)
Check this xaml, you will get some idea. You need to enable a disabled activity to assign your input value to the strInput string variable.
can you show the screenshot
Thanks for your reply
I worked with this but I am getting the output as System.String[] i want to get the value
Thanks for your Reply,
I worked with this but I am getting the output as System.String[] i want to get the value
Add a for each loop with String type and pass the output array in it, then print that. you can see the values printing the output window.
You need to use ‘For Each’ loop activity on the Array to get values of the array.
what should be the type of arrOutput
If you are using For Each Row activity then you should change the Type of argument in the properties to ‘String’.