Skip to main content

PDF table import

Import PDF tables into Excel

Detect logical tables in a PDF and import them into an editable XLSX with explicit warnings when page content is not tabular or rows exceed configured limits.

Practical steps

Import detected PDF tables into Excel

Analyze logical table structures, create an editable workbook, and report omitted or truncated content.

  1. SelectChoose a readable PDF containing table-like content.
  2. DetectAnalyze logical rows and cells under the configured import limits.
  3. ReviewDownload the XLSX and inspect warnings for non-tabular page content or truncated rows.

This route is intentionally named PDF tables to Excel. It does not pretend that an entire page—paragraphs, images, charts, and drawing commands—maps naturally to worksheet cells.

Import from .NET

using OfficeIMO.Excel.Pdf;
using OfficeIMO.Pdf;

PdfDocument pdf = PdfDocument.Open("statement.pdf");
PdfExcelTableImportResult result = pdf.ImportTablesToExcelDocumentResult();
using var workbook = result.Value;

File.WriteAllBytes("statement.tables.xlsx", workbook.ToBytes());
foreach (var entry in result.Report.Entries) {
    Console.WriteLine(entry);
}

The result records detected tables and whether page content remained outside the table-only route. Applications can choose stricter limits and reject a workbook when omitted content or truncation is unacceptable.

Tables are inferred evidence

Many PDFs draw table-like layouts without storing formal table semantics. Detection depends on readable text, positions, and the logical structures available in the source. Always verify representative rows, headers, merged regions, and numeric values before using the workbook for calculations or decisions.