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.
Excel Options
When converting PDF files to Excel files, pay attention to the following options:
excel_all_content: If enabled, the converted XLSX file contains all content in the PDF.excel_worksheet_option: Controls how worksheets are created.
| Option | Description |
|---|---|
e_CForTable | Create one sheet for one table. |
e_CForPage | Create one sheet for one PDF page. |
e_CForDocument | Create one sheet for the entire PDF document. |
Sample
c
CConvertOption option = CPDF_DefaultConvertOption();
CPDF_StartPDFToExcel(CPDF_TEXT("excel.pdf"), CPDF_TEXT("password"), CPDF_TEXT("path/output.xlsx"), option, NULL);
option.excel_all_content = true;
option.excel_worksheet_option = e_CForDocument;
CPDF_StartPDFToExcel(CPDF_TEXT("excel.pdf"), CPDF_TEXT("password"), CPDF_TEXT("path/output_all.xlsx"), option, NULL);