An essential n8n workflow for merging multiple local Excel files into a single multi-sheet document, including a dynamic summary sheet using the custom Code n8n node and the 'xlsx' library.
Download this n8n workflow template and start using it instantly.
Managing multiple Excel reports can lead to fragmentation and difficulty in reporting. This highly technical n8n workflow solves this by automatically scanning a local directory, reading all individual .xlsx files, extracting their data, and compiling them into a single, unified Excel document.
Crucially, this n8n template uses the powerful Code n8n node along with the external xlsx module to dynamically create multiple worksheets (one for each source file) and generate a comprehensive 'Summary' sheet detailing file counts and record totals. This level of customized file generation showcases the advanced capabilities available within an n8n installation, transforming scattered data into a clean, consolidated report.
This specialized n8n workflow is designed for self-hosted environments requiring external package support.
When clicking ‘Execute workflow’.Read XLXS Files from Disk ReadWriteFile n8n node scans the configured n8nfiles/ directory, identifying all .xlsx files.Read each XLXS n8n node (Split In Batches) iterates over the list of files, allowing the n8n workflow to process them one at a time.XLSX to Json List n8n node extracts the tabular data from the current Excel file, converting it into JSON items.Mulipte Json to Single Json n8n node (Aggregate) collects all the extracted JSON data from every batch iteration into a single list.Collect and Process Data Code n8n node receives the aggregated list. It cleans the data (filtering out empty rows), extracts metadata like original filenames, and organizes the data structure for the next step, ensuring proper sheet naming.Create Multi-Sheet Excel Code n8n node executes the core merging logic. It utilizes the external xlsx library to build a new workbook. It loops through the processed data, creating a unique worksheet for each original file, applying sanitization to sheet names (max 31 chars), and finally, generating a dedicated 'Summary' sheet with file metadata. The result is returned as binary data.Save XLXS to Disk ReadWriteFile n8n node saves the final generated binary Excel file to the specified output path (n8nfiles/output/) on the disk.To deploy this powerful n8n workflow, follow these steps:
xlsx library. If you are self-hosting via Docker (the recommended method for this n8n template), you must configure your environment:xlsx NPM package.Dockerfile with the following content (or similar, depending on your setup):FROM n8nio/n8n:latest
USER root
RUN npm install xlsx
ENV NODEFUNCTIONALLOWEXTERNAL=xlsx
ENV NODEPATH=/home/node/nodemodules
USER node * Environment Variable: Ensure NODEFUNCTIONALLOWEXTERNAL=xlsx is set in your environment configuration.n8n_files/ and place all the .xlsx files you wish to merge inside it.*.xlsx files within the n8nfiles/ directory.xlsx external module. It programmatically constructs a multi-sheet workbook based on the collected data and adds a crucial summary report sheet. It outputs the final merged file as binary data.n8nfiles/output/ using a dynamically generated filename including a timestamp.Automate Meraki network monitoring using this efficient n8n workflow. Detect critical uplink packet loss or latency issues, calculate 5-minute averages, and send deduplicated alerts to Microsoft Teams. Download this powerful n8n template for reliable network management.

Use this powerful n8n workflow to manage event registrations via a custom form and run an interactive, privacy-protected giveaway app using PostgreSQL data. Deploy quickly using our n8n templates.

Automate meeting scheduling, availability checking, and email confirmations using this powerful n8n workflow. Deploy an AI agent integrating Telegram, Google Calendar, and Gmail.

Learn how to merge multiple PDF files using an n8n workflow template. This n8n node guide details downloading files, merging binary data, and writing the final PDF.

Automate PDF merging tasks using this robust n8n workflow. Download multiple remote files, use the ConvertAPI service, and save the resulting document automatically. Leverage this powerful n8n node integration.

Use this powerful n8n workflow to merge multiple RSS feeds, clean data using regex, filter for recent content (48 hours), and broadcast the curated list as Markdown messages via Telegram. A prime example of effective n8n templates.









































