Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Convert PDF to Excel

Overview

ComPDF Conversion SDK supports converting PDF documents to Microsoft Excel format (.xlsx). By extracting, parsing, and importing data from PDF into Excel, users can further edit, analyze, or share Excel files.

Set the Content Options for Excel

When converting PDF files to Excel files, the following options directly affect content written to the Excel file.

  • excelAllContent: whether the converted XLSX file contains all content in the PDF.
  • excelCsvFormat: whether to save table data in CSV format.
  • excelWorksheetOption: worksheet layout option.
OptionValueDescription
FOR_TABLE0Create one sheet per table.
FOR_PAGE1Create one sheet per page.
FOR_DOCUMENT2Create one sheet for the entire document.

Sample

js
const options = {
  excelWorksheetOption: 0
};

const result = sdk.startPDFToExcel(
  inputFilePath,
  "",
  outputFilePath,
  options
);