Get data from PDF and Write it in Excel File

I want to extract data from pdf and write it in excel file and pdf contains a bank statement. But I want to write it in excel file with some conditions.
In excel file:
Sheet 1 consists all the record of statement
Sheet 2 consists date wise record like How much i spent and how much i earn on that day and also shows the total sum of that day.

1 Like

If you have the PDF that would be great!
Also, is your PDF in text or picture format?
You can Read PDF with Read PDF Activity, from the PDF Activity package (you can download them from the package manager)
Then you can use Regex Matches, Is Match activities and String manipulations to get what you want and check those conditions

Hi Aman,

Generally when you extract PDF using 1.Read PDF Activity or 2.Read PDF with OCR activities the output will be in string format.
If your PDF contains data in structured table, then you can use Data scraping so that the output will be in data table form and will be very helpful for validations as well.
If you get output in string, you should do string manipulations to get actual values which has to be passed through conditions.
Finally you can write the processed details into Excel using Excel activities.

1 Like

It’s in text format and I already tried it but didn’t work.

Yes, I did the same but didn’t work. As I said the data is in structured table I use data scraping and it gives me an output in outputdatatable but when I tried to print it in messagebox as var_name.tostring it prints nothing in it.

What does not work?

Don’t try to print directly, Use Output datatable activity to convert data table into string, then print that string.
Try with write line, you can see the output in console.

How to get Table from pdf files in Folder and seach values of table in a web application