Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF to XLS conversion using Excel VBA

Status
Not open for further replies.

phudgens

Technical User
Jul 8, 2004
117
US
Does anyone know of any onboard libraries or routines in Excel (ie non commercial) for converting PDF files to Excel XLS files? I know there's a way to convert PS files to PDF files, but not sure about PDF to XLS. Preferably this would be done using VBA code.

Thanks,
Paul Hudgens
Denver
 
There are no such "onboard" libraries.
PDF is not really nice to work with. It is meant as an end format, not as editable format; hence the strong limits to editing PDFs.

You can build yourself some crutchy code if you have Acrobat professional, referencing the acrobat.tlb and using the AcroExchange object model.
On the other hand, if you had Acrobat professional, e.g. version 9, you would not need such code anyway as you could more or less directly export from within Acrobat.

What SW do you have at your disposal? What version of Excel?

Cheers,
MakeItSo

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
You could try to save your pdf as text file (from Adobe file menu) and format it from there.
 
Sorry about the delay in my reply - got busy with other stuff. I do have Adobe Reader 9.0, but as far as I know, that does not include Acrobat or Acrobat Professional. I am willing to buy it though if it will allow me to convert a PDF file to XLS from within Excel VBA code. Hopefully, it would have command line capability which could be invoked via a ShellandWait command in VBA.
 
If you really want to do it from VBA, then better don't buy the full Acrobat Pro. It is too expensive for that!
In addition, VB-Scripting capabilities of Acrobat are, mildly put, POOOOOOR!
I would recommend you to google a bit for other commercial software that also supports com/Activex API.

Good luck. Alas, what I found at first search was all quite expensive.



[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
When I looked at this a while ago there was a utility to convert PDF to text, actually it extracted the text part of PDF to a text file. The results were not so good, the utility worked fine but the layout in the PDF file is the actual problem.
 
Thanks for everyone's input. I'll take a look at what is available commercially.

Paul H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top