Click or drag to resize
Pdf Library for .NET

PdfToExcel Class

Pdf to Excel Converter. This class offers the API needed to convert the tables of a pdf document to an Excel workbook (xlsx).
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfToExcel

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public class PdfToExcel

The PdfToExcel type exposes the following members.

Constructors
 NameDescription
Public methodPdfToExcelCreates a pdf to Excel converter with the default options.
Top
Properties
 NameDescription
Public propertyOptionsGets the conversion options.
Top
Methods
 NameDescription
Public methodConvertBytesConverts a pdf held in memory.
Public methodConvertFileConverts a pdf file.
Public methodConvertStreamConverts a pdf read from a stream.
Top
Remarks

The pages are read as text in reading order and their tables are found from their rules or their aligned columns. Each table becomes cells: numbers, percentages, currency amounts and dates as typed values with a number format, text as text, header rows bold and frozen, merged cells merged, the shading and borders the pdf draws, and the column widths of the pdf. Sheets puts each table on a worksheet of its own (the default) or each page.

The conversion runs in-process.

Example
PdfToExcel converter = new PdfToExcel();
byte[] xlsx = converter.ConvertFile("statement.pdf");
File.WriteAllBytes("statement.xlsx", xlsx);
See Also