Home > Forum Home > Developing Business Administration Solutions > Importing Data from PDF Files Share

Importing Data from PDF Files

Excel Help for Importing Data From Pdf Files in Developing Business Administration Solutions


Forum TopicPost Reply Login

Importing Data From Pdf Files

Rate this:
(4.2/5 from 24 votes)
Happy Business Spreadsheets has developed a free Excel program to extract and import PDF data into Excel which can be downloaded and used without restriction.

There is a common need to extract and import specific data from PDF files into Excel. Since Excel does not natively support the reading of PDF content, utilities are needed to convert the PDF file content for the Excel format. Several commercial applications accomplish this; however it is often the case where only specific data is required to be imported from multiple PDF files into one structured format.

We created such an application by using VBA code in conjunction with an open source PDF to Text conversion utility, which can be found at Foolabs.

[Download the free PDF data import Excel program here]

The program relies on the conversion utility (included in the download) and all PDF files to reside in the same directory as the Excel application. Text or data to extract are defined in the Control sheet by specifying start text, end text and multiple replacements routines with wildcard support. This enables flexibility to obtain comparable data from multiple PDF files based on patterns independent of different PDF file structures.

As many extraction rules as required can be set in order to create a table of information imported by extraction rule and PDF file name. Information on how to set up rules is available within the Excel application with a help icon and cell comments. The VBA code is commented and open for modification.

Any improvements or new features to the code are welcome to be posted here so that we can update the download version to the benefit of everyone.
 Excel Business Forums Administrator
 Posted by on
 
Replies - Displaying 31 to 40 of 88Order Replies By: Most Recent | Chronological | Highest Rated
Confused
Rate this:
(3/5 from 1 vote)
The data that I want to extract is at last but one page of invoices that are in pdf format. Your programs goes to only first page. Please help me ASAP.
 apache
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Does anyone know how to get this macro to work in sharepoint? It's not pulling the data from the pdf's.

Thanks
 LEWIS EVANS
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Almost there! :)
The results are displayed inline in the results.
The records are correctly identified.
The fields work ok with latin caracters like áéõç... and special caracters like $,x²,(),: (thats a big plus).
I've found a bug, if one of the fields has a pipe "|" in the value, the script seems to shift fields.
Sample: 
Field1 abc
Field2 123|456
Field3 xyz
Result:
  field1 field2 field3
Expected Result  abc 123|456  xyz 
Actual Result  abc 123  456
In this particular case, when "|" is found the replacement pairs doesnt work after the "|".
The 19/02 version displayed 123|456 as two separated lines in Multiple Instance Data table, and in the "Combined Last Instances" its displayed correctly as "123|456".
 Alexandre
 Posted by on
Grateful
Rate this:
(3/5 from 1 vote)
WOW ... Congrats !

very good... the tool is PERFECT ! ;)

just to notice: when "Keep Text Files" is checked, the tool is not working perfectly... its not going to the end of the file... for. ex. instead 120 pages, it founds the matches just in 20 or 21 pages ...

BUT, for me it is not problem at all ... i think also for the others, when they now know it ... ;)


 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
I think this example will help you ...

in PDF:                  Bank Account                  1111111
                            Transaction Amount           369 EUR
                            Descripton                          789456123
                            Name/Adress                     Paris, 86 AV.
-------------------------------------------
                             Bank Account                  22222222
                            Transaction Amount           258EUR
                            Descripton                          147258369
                            Name/Adress                     Amsterdam, 86 AV.
-------------------------------------------
                             Bank Account                  333333333
                            Transaction Amount           147 EUR
                            Descripton                          321456849
                            Name/Adress                     Berlin, 86 AV.
---------------------------------------------
                            Bank Account                  444444444
                            Transaction Amount           789 EUR
                            Descripton                          7539514862
                            Name/Adress                     
-----------------------------------------------
OUTPUT=>
eadsheet:
  Bank Account Transaction Description Name/Adress
1  111111  369  789456123  Paris
2  222222  258  147258369  Amsterdam
3  333333  147  321456849  Berlin
4  444444  789  7539514862  

as you see, we always have an reference that is allways different and

the code should look something like this:

Do while bank account is new
     -the code what we already have(for multiple data), only if possible modified to show the results as at the table abowe
...

after doing this, think you (we also) have an very good product, which will be helpfull to a lot of people....
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)

i think that it will be much easier to manage with tha multiple data, if they are shown in order how they are found.

for Example:
I have in PDF: Bank Account, Transaction Amount, Transaction Description, Name/Adres...

and now they are in order of key Word
Transaction Amount
TransactionAmount
Transaction Amount ....
Bank Account
Bank Acount
Bank Account .... ect

so if they are shown in order how they are found, i can use an reference(in my case -Bank Account) to manage them

I think its clear what i mean ?!
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
and how would it look like, to take more repeatable data from one .pdf file?
which part of the code shold be changed?  maybe "For Each .... in .... loop" will help here, but which variable is  to be repeated ?


i need it, cause i got every day statement in .pdf with 120 pages and untill now i have coppied every ... 

Transaction Amount, 
Payment Details, 
Name/Address ... ect ... (around 400 copies and 400 paste-s :S)


x10 TNX
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Great!

Thanks!

if i get some new idea ... i will come back - to ask or to propose

 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Sh*t, I hate when a complete post gets lost... let's try again :/

The problem with the pivot table, is that if any of the records has a missing field you wouldn't be able to tell which field belongs to a record.

Sample Data:
Customer Enquire
Name: John Doe
Phone: 555-5555
Email: [email protected]
Question: What time is it?

Customer Enquire
Name: Jane Doe
Phone: 666-6666
Question: Whats 2+2?

Customer Enquire
Name: Larry Moe
Email: [email protected]
Question: To be or not to be?
---
Note that there could be missing fields, like Phone or Email. In this case we would have this rows: 3 names, 2 phones, 2 email and 3 question it would be hard to tell who has a phone, an email or both.
If one could use a special keyword, like 'Customer Enquire', as a record separator maybe the script could deal with this as beeing a different file.
 Alexandre
 Posted by on
Applaud
Rate this:
(3/5 from 1 vote)
  • Should they be left blank or filled with the previous match for that pattern.
Like the previous versions, if the new file didn't found any match it would appear as blank. I think thats a good aproach since a missing item often mean its "blank".
  • What determines whether a whole set should be deemed ready for output? At the moment we're looking at each time the first pattern is found, we look to see if all patterns have been found already, output the results, reset the cache and continue in the file.  Maybe this should be the last pattern.
I guess that the first pattern could work, if it finds a new first pattern or EOF consider it to be a complete record and starts a new one.

 Alexandre
 Posted by on
 Displaying page 4 of 9 

Excel templates and solutions matched for Importing Data from PDF Files:

Solutions: Export MapPoint Waypoints Survey Data Analysis