CSV to JSON

Hi n8n community,

I download a CSV file from a FTP server, but I can’t get the datas in the file, I don’t understand why but the node Spreadsheet File doesn’t return anything.

Below you can see my workflow :
image

And the result of the Spreadsheet File node :

Would you have an idea how to process with this problem ?

Thank you

Hi @BenJ :wave: I just tried to test this with downloading a csv file from my own FTP server and running it through the Spreadsheet File node, but the output was what I expected :thinking: Can you provide a sample csv that you’re seeing this behaviour with? Obviously please redact any sensitive data :see_no_evil:

This information would be helpful, too:

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

Hi @EmeraldHerald !
I can’t share the CSV file through this message but it is a simple file, I copy/paste it :

M3;20231002;120000;CRE;PG99999A;MOT;

  • n8n version: 1.2.1
  • Database : postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): I don’t really know, sorry :confused:
  • Running n8n via : Docker
  • Operating system: n8n-io

I don’t understand why I can’t get thoses datas from the file.

1 Like

Hi @BenJ :wave:

Just had a play around with this - it looks like if you only have the one line, the Spreadsheet node might assume those are just the header rows, and the actual data is empty. When I inserted a row above your data, I got this as an output:

Most csv files would have headers, so I’m not so sure this a bug :thinking:

Hi @EmeraldHerald

Thank you for your reply. The problem is that I receive the data as I showed you.

I will see if I can do something, thank you for your time ! :grinning:

1 Like

Hey @BenJ,

Just a quick one that I forgot about, In the options for Spreadsheet File you can disable the Header file option but the downside there is our CSV parsing is comma seperated so you would need to do some more magic to split out the items.

1 Like

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