Overview
This node adds a new sheet to an existing binary XLSX file. It is useful when you want to programmatically extend Excel files by inserting additional sheets with custom data. Common scenarios include dynamically generating reports, appending data from different sources into one spreadsheet, or modifying Excel files in workflows without manual intervention.
For example, you might have an Excel file containing sales data and want to add a new sheet with summary statistics or charts generated during the workflow execution.
Properties
| Name | Meaning |
|---|---|
| Sheetname | The name of the new sheet to add to the Excel file. |
| Data | The JSON data to append into the new sheet. This represents the content of the sheet. |
| Binary File | The binary property name that contains the XLSX file to which the new sheet will be added. |
Output
The node outputs the modified Excel file as binary data. The output contains the original file plus the newly added sheet with the specified data. The json output field typically includes metadata or confirmation details, while the actual Excel file is available in binary form for further use or download.
Dependencies
- The node relies on an external helper script (
addsheet.js) located in the same directory, which implements the logic to add the sheet. - No external API keys or services are required.
- The node expects the input Excel file to be provided as binary data within the workflow.
Troubleshooting
- Missing or invalid binary file: If the binary property containing the Excel file is not set or invalid, the node will fail to process the file. Ensure the correct binary property name is provided and that it contains a valid XLSX file.
- Invalid JSON data: The data to append must be valid JSON representing the sheet content. Malformed JSON may cause errors.
- Sheet name conflicts: Adding a sheet with a name that already exists in the Excel file might cause unexpected behavior or overwrite issues. Use unique sheet names.
- File path issues: The node dynamically imports a local script (
addsheet.js). If this file is missing or inaccessible, the node will error out.