Overview
This node converts Excel files to PDF documents. It is useful when you need to generate PDF reports or share Excel data in a universally readable format without requiring recipients to have spreadsheet software.
Typical use cases include:
- Automating report generation from Excel spreadsheets.
- Archiving Excel data as PDFs for compliance or record-keeping.
- Sharing specific sheets or tables from Excel files as PDFs.
For example, you can input an Excel file containing sales data and convert a particular sheet into a formatted PDF report with optional column headers.
Properties
| Name | Meaning |
|---|---|
| Destination Key | The name of the binary key where the generated PDF will be stored. |
| PDF Name | The filename to assign to the output PDF document. |
| Excel Binary Field | The binary field containing the Excel file to convert. |
| Include Headers | Whether to include the Excel sheet's column headers in the PDF output (true/false). |
| Sheet Name/Index | The name or index of the worksheet to convert. Use "1" for the first sheet, "2" for the second, etc., or specify the sheet name. |
| Keep Excel File | Whether to keep the original Excel file in the binary data after conversion (true/false). |
Output
The node outputs a binary field containing the generated PDF file. This binary data is stored under the specified destination key and named according to the provided PDF name property.
The output JSON structure includes the original item data plus the new binary PDF data. If configured to keep the original Excel file, that binary data remains; otherwise, it is removed.
Dependencies
- Uses the
exceljslibrary to read and parse Excel files. - Uses
pdfkitto generate PDF documents. - Requires input items to contain binary data with the Excel file.
- No external API keys or services are required.
Troubleshooting
Error: Excel field "X" does not exist on item!
Ensure the binary field name exactly matches the one containing the Excel file.Worksheet "Y" not found in the workbook.
Verify the sheet name or index is correct and exists in the Excel file.Invalid sheet index: Z.
Check that the sheet index is within the range of available sheets.The selected worksheet is empty.
Confirm the worksheet contains data to convert.Error converting Excel to PDF: followed by details.
Usually indicates a corrupted or invalid Excel file. Validate the file integrity.If no binary data exists on the input item, the node will throw an error. Make sure the input contains the expected binary Excel file.
Links and References
- ExcelJS GitHub Repository – For reading Excel files.
- PDFKit Documentation – For PDF generation features.