My output Excel file has incorrect formatting - data is crammed into 3 columns

Hello everyone,
I’m building a workflow that reads an Excel file, performs some calculations, and creates a new, summarized Excel report. The final report should have two separate sheets with clean, readable tables.

The Problem

My workflow runs without errors, but the final Excel file is not formatted correctly. Instead of proper tables on two different sheets, all of my calculated data is compressed into just 3 columns on a single sheet. The output is unreadable and doesn’t look like a normal spreadsheet.

My Workflow Steps

  1. Extract from File: I read the data from my source XLSX file.
  2. Code: I use a Code node to perform mathematical calculations and create two summary tables.
  3. Convert to File: I try to convert these summary tables back into an XLSX format.
  4. Merge: I use this node to combine the results into a single file with two sheets.

My Question

It seems the Convert to File node is not understanding how to create a proper table from my calculated data. How should I configure my workflow, especially the Convert to File and Merge nodes, to produce a clean Excel file with two properly formatted sheets?
I feel like I’m missing a key setting for formatting the output correctly. Any help would be fantastic.
Thank you! right.
If your question hasn’t been asked before, please follow the template below. Skip the questions that are not relevant to you. →

Describe the problem/error/question

What is the error message (if any)?

One merge input is missing i know but it is not the problem. Main problem is in convert to file node.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @denizwht

I think with current nodes it’s not possible to append data to the existing excel file. Basically, the convert node copies all input data to the file.

Im not appending data to exist excel file, i append to new excel file and also i solved little bit when i change code node.
But as you see rows was moved. I need to fix that problem now.

I have almost 6 table like that and i thought i can separate them to 6 code node 6 convert file node and merge them all. I will try that.

you have two sets of data. The first set (columns A:D) is within the creation of the excel file. And another one (columns E:L) to append data.

The easiest method would be to create a separate excel file for each set of data and then manually merge sheets.

If i do that with manually whats the point of automation but thanks to helping and giving up your time

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.