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 81 to 88 of 88Order Replies By: Most Recent | Chronological | Highest Rated
Oops
Rate this:
(3/5 from 1 vote)
To extract multiple instances of text from both within and across multiple PDFs, we need to make sure that the start and end text that surrounds the content required is generic enough to match the multiple instances.  If the text needs to be identified by instance, then we need to specify multiple start and end texts that will pick up each instance.
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
Sometimes we need to get creative to match beginning and end text.  In your example you have a closing bracket with the item number. Perhaps this can be used or something on the third line using a wild card.

After the extraction we can run replacements to remove unwanted text content which also comes in handy for defining the extraction rules. 
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
From the example given it is hard to know whether it work, but if the end text was simply '% ' then the the extraction should stop on the first number since the last % one would be at the end of the line and have no space after it.

Otherwise, one could extract the first number from the output by using a LEFT(Cell,FIND(Cell," ")-1) formula. 
 Excel Business Forums Administrator
 Posted by on
Sad
Rate this:
(3/5 from 1 vote)
If there is a space after 'number' then what about starte text as 'number ' and end text as ' '? Logically this would capture only the first numeric. 
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
From the PDF on Google drive, it seems that you need to have "PERSONAL INFORMATION" as the start text and "STRENGTHS AND ABILITIES" as the end text which would get everything in between. You can also then replace these strings in the replacement pairs.
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
The error is due to the file extension in upper case. The file name is test4.PDF. It works if we save the files as test4.pdf or change the VBA code to lower case the file extension:
VBA Code:
'get collection of pdf files
While strFile <> ""   
If LCase(Right(strFile, 4)) = ".pdf" Then
        colFiles.Add strFile   
End If  
strFile = Dir
Wend 
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(2/5 from 2 votes)
To recuperate interactive form data, the best solution is to use a script to load to a data connection.

Foxit Phantom PDF provides some type of ODBC connectivity via JavaScript.  Also, Adobe Acrobat provides a tool to extract XFA data into a spreadsheet.
 Excel Business Forums Administrator
 Posted by on
Oops
Rate this:
(2/5 from 2 votes)
The modification to the VBA for appending results is independent of the PDF files for data import and should therefore work. The logic is that results are not deleted at the beginning and the first row variable 'mrow' is set to the first empty row in the results.
 Excel Business Forums Administrator
 Posted by on
 Displaying page 9 of 9 

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

Solutions: Export MapPoint Waypoints Survey Data Analysis