tags:

views:

726

answers:

3

Hi,

Is there a sample code or utility which I could use to read PDF documents and convert or export the data into an Excel document?

Most of the sample codes I see when searching are converting Excel to PDF.

Would appreciate your advice. Thanks.

+2  A: 

The problem is that the PDF probably does not retain any spreadsheet type structure - its just text drawn on a page. So you are unlikely to happy with the results unless its a really simple page.

mark stephens
Yep, spot on. It's a tricky business.
Rowan
A: 

Your only real option here is to look for a third party solution. I doubt you'll find a free SDK that lets you do this either, for the simple reason that it's not that easy. I'd check out Solid Documents and possibly some of Investintech's solutions.

Newer versions of Acrobat also provide some more advanced PDF to Excel extraction capabilities, so Adobe's PDF Library SDK might be worth looking at too.

Rowan
A: 

You can pull out data with pdfsharp and use openxml sdk to create an excel file. That way you will get exactly what you want. It will take a bit of work, but does not require excel or acrobat or anything that costs money.

Pros:

  • Free
  • No Excel object model
  • Only uses libraries
  • You get exactly what you want

Cons:

  • Takes time to code it
jle