Describe the problem/error/question
I need to create a CSV file with a specific delimiter (“;”) based on a template. I need to do this on a regular basis. The template has several columns that will be empty in each row, but must be included in the file.
As I have no MS 365 account and don’t want an active subscription, I decided to go with Google Sheets instead. I imported my template to Google Sheets and everything is fine. Now I collect my data and prepare it. Then I create a copy of my Google Sheets template and append the data.
When I open the file in the browser, everyhing is correct. It looks like this (just a small portion of the file):
When I download it right in the browser from the Google Sheets web app as Excel or CSV file everything is fine (except for the wrong delimiter as CSV). The columns are still in the correct order, like on the screenshot.
Now back to n8n. I’m using the “Convert to File” node twice here (just for demonstration purposes): one time I export to CSV file (with the correct delimiter), the other time I export to Excel. After the export, but files have messed up the column order. In both versions there comes first all the columns with data in it, then all the empty columns.
It probably depends on the already wrong displayed output of the Google Sheet node, which does the mess up:
As you can see here, the order is not the same is in my first screenshot. But for whatever reason, the Google Sheet itself is looking perfect fine (that was the first screenshot).
But n8n seems to work with the output of the Google Sheet node instead of the real data inside the Google Sheet file.
Best regards,
Sven
Information on your n8n setup
- n8n version: 1.76.1
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: