Overview
This node provides PDF manipulation capabilities with three main operations:
- Convert Excel To PDF: Converts an Excel file (from binary data) into a PDF document. It supports selecting a specific sheet by name or index, optionally including column headers, and outputs the resulting PDF as binary data.
This operation is useful when you want to generate PDF reports or share Excel data in a universally readable format without requiring recipients to have spreadsheet software.
Practical examples:
- Automatically convert sales or inventory Excel sheets into formatted PDFs for emailing or archiving.
- Generate printable versions of Excel data tables for presentations or documentation.
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 file. |
| 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 numeric index (1-based) of the Excel sheet to convert. Can be a sheet name string or number. |
| Keep Excel File | Whether to keep the original Excel file in the binary data after conversion (true/false). |
Output
The node outputs items with a binary property containing the generated PDF file under the specified destination key. The PDF is a standard PDF document representing the selected Excel sheet content formatted as a table.
If "Keep Excel File" is false, the original Excel binary data is removed from the output item; otherwise, it remains.
Dependencies
- Uses the
exceljslibrary to read and parse Excel files. - Uses
pdfkitto generate PDF documents. - Requires input items to contain valid binary Excel files in the specified binary field.
- 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 field containing the Excel file in the input item.Worksheet "Y" not found in the workbook.
Verify the sheet name or index provided exists in the Excel file. Use the exact sheet name or a valid 1-based index.Invalid sheet index: Z. The workbook has N sheet(s).
The sheet index is out of range. Provide a number between 1 and the total number of sheets.The selected worksheet is empty.
The chosen sheet contains no data. Confirm the sheet has content before converting.Error converting Excel to PDF: ...
This may indicate a corrupted or unsupported Excel file. Check the file integrity and format.
Links and References
- ExcelJS GitHub Repository - For details on reading Excel files.
- PDFKit Documentation - For understanding PDF generation features used.
- n8n Documentation - General info on working with binary data and custom nodes.