SpreadSheet node misinterpret datas

Hello,

I am working with some CSV files, but some datas from the file are encoded wrong, all of my dates are interpreted as float like in the picture below.

I checked the option “Read as a string” and my datas are standing like this. I have the same problem with another column with text “0022-0002” which is transformed in a float like in the picture.

Could you let me know if I did something wrong ?

Thank you,
Ben

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

@BenJ , could you share your raw CSV file (just a few lines from it if it’s too large)?

Here’s the test workflow and the data looks fine to me

Hi @ihortom, here is some corrupted datas, I can’t share a lot more because of confidentiality.

@BenJ , this is not CSV format. CSV stands for “comma-separated values”. You have ; separating data. How do you import such data into n8n workflow in the first place? When I use standard CSV file (same values you have but comma separated) I have no problem interpreting those values as strings in the same form they are in the file. I didn’t even have to choose the option “Read As String”

For clarity, I created CSV file locally in the container, read it with “Read Binary Files” and then with “Spreadsheet File” node. All looks as expected

The last node produced (extract)

[
  {
    "Code": "0072-1017",
    "Date": "07/07/2015"
  },
  {
    "Code": "0072-0801",
    "Date": "07/07/2015"
  }
]
1 Like

Hi @ihortom,

Thank you for your reply.

Have a good day

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