PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
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. This feature helps increase productivity, reduce manual entry errors, and simplify complex document processing tasks.
When converting PDF files to Excel files, you need to pay attention to the settings of the following options, which will directly affect the content written to the Excel file.
Content options: If you set the excel_all_content option, The converted Xlsx file will contain all the contents in the PDF.
Worksheet options:
| Option | Description |
|---|---|
ExcelWorksheetOption::e_ForTable | Create one sheet for one table. |
ExcelWorksheetOption::e_ForPage | Create one sheet for one PDF page. |
ExcelWorksheetOption::e_ForDocument | Create one sheet for the entire PDF document. |
This sample demonstrates how to convert from a PDF to XLSX file.
ConvertOptions opt;
CPDFConversion::StartPDFToExcel("excel.pdf", "password", "path/output.xlsx", opt);
// Set all content options.
opt.excel_all_content = true;
opt.excel_worksheet_option = ExcelWorksheetOption::e_ForDocument;
CPDFConversion::StartPDFToExcel("excel.pdf", "password", "path/output.xlsx", opt);