Overview
This node converts JSON data into an Excel spreadsheet file. It supports multiple input formats for the JSON data, including raw JSON strings, binary files containing JSON, and base64-encoded JSON strings. The node is useful when you want to transform structured JSON data into a tabular Excel format for reporting, data analysis, or sharing with users who prefer Excel files.
Typical use cases include:
- Exporting API response data (in JSON) into Excel for easier viewing.
- Converting JSON logs or datasets into Excel spreadsheets for further processing.
- Automating data transformation workflows where JSON data needs to be saved as Excel files.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the JSON data to convert. Options: "JSON String" (direct JSON content), "Binary Data" (JSON file from previous node), "Base64 String" (base64 encoded JSON content). |
| JSON Content | The JSON data to convert to Excel, provided as a JSON string. Used only if Input Data Type is "JSON String". |
| Input Binary Field | Name of the binary property that contains the JSON file. Used only if Input Data Type is "Binary Data". |
| Base64 JSON Content | Base64 encoded JSON content. Used only if Input Data Type is "Base64 String". |
| Output File Name | Name for the output Excel file. Default is "converted_data.xlsx". |
| Document Name | Name of the output document for reference purposes. Default is "output". |
| Worksheet Name | Name of the Excel worksheet inside the file. Default is "Sheet1". |
| Advanced Options | Collection of optional advanced settings: |
| - Convert Numbers and Dates: Automatically convert numbers and dates in JSON to Excel types. | |
| - Custom Profiles: JSON string to specify extra options for the conversion process (refer to external API documentation). | |
| - Date Format: Pattern for formatting date cells in Excel (e.g., "MM/dd/yyyy"). | |
| - First Column: Starting column number (1-based) for placing data in Excel. | |
| - First Row: Starting row number (1-based) for placing data in Excel. | |
| - Ignore Null Values: Whether to skip null values in the JSON data. | |
| - Number Format: Excel number format code for cells. Options include General, Number, Currency, Percentage, Scientific, Date, Time, etc. | |
| - Title Bold: Whether to make the title/header row bold. | |
| - Title Wrap Text: Whether to wrap text in title/header cells. |
Output
The node outputs an Excel file (.xlsx) containing the converted data from the input JSON. The output includes:
- A JSON field with metadata about the generated file.
- A binary field containing the actual Excel file data, which can be used downstream in the workflow for saving, sending, or further processing.
The Excel file will have one worksheet named as specified by the user, with data starting at the configured row and column. Formatting such as number/date formats and header styling are applied based on the advanced options.
Dependencies
- This node relies on an external API service for converting JSON to Excel, which requires proper API authentication via an API key credential configured in n8n.
- The node uses bundled action modules internally to perform the conversion.
- No additional environment variables are explicitly required beyond the API key setup.
Troubleshooting
- Invalid JSON Input: If the JSON content is malformed or not properly formatted, the node may throw parsing errors. Ensure the JSON string or file is valid.
- Incorrect Binary Property Name: When using binary input, specifying the wrong binary property name will cause the node to fail to find the JSON file. Verify the binary property name matches the previous node's output.
- API Authentication Errors: Missing or invalid API keys will result in authorization failures. Confirm the API key credential is correctly set up.
- Unsupported Data Types: Complex nested JSON structures might not convert as expected. Flatten or simplify JSON if conversion issues occur.
- Large Files: Very large JSON inputs may cause timeouts or memory issues depending on the external API limits.
Links and References
- Excel Number Formats
- Date Format Patterns
- PDF4me API Documentation (for advanced profile options)