Spreadsheet xls encoding

Hi,

a customer sends me a xls file every week.

I have some encoding issues processing this file:
𨷡 = ü
䴩 = ä

Is there a workarround for my very German ä,ü,ö,ß-issues?

Thanks!

1 Like

Hi @JanMrlth1 :wave:

Can you share your workflow and a sample xls file that doesn’t contain any sensitive data where this happens?

Could you also share the following:

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

Hi,

I am running the latest and greatest 1.1.1
docker-compose with n8nio/n8n and postgres:11; labels for traefik
EXECUTIONS_PROCESS or EXECUTIONS_MODE are not set.

I uploaded a file here: https://static.marloth.tech/xxxx96_Statusliste.xls
I hope, that it was not altered, when I opened it in Excel to remove the sensitive data.

Thanks for looking into this!

Cheers
Jan

Hi @JanMrlth1, @EmeraldHerald will be out today, but perhaps could you share your workflow as well?

I just took your example file for a quick spin using the below workflow on [email protected], but umlauts showed up as expected for me:

So I think it’d be good to understand how exactly you process the file to end up with the broken values.

Thank you!

This is the raw file, that we get. I did that changes this time without opening it in Excel.

https://static.marloth.tech/xxxx29_Statusliste.xls

That is the only bit, that jumps into my eye in the diff.
I tried to change/add these lines without success.

With a http request from that file I get the same result as from my email.

1 Like

grafik

I guess that is it.

Is there a way to change that in an n8n-workflow?

Hi @JanMrlth1, I’m back in today and Tom is out :slight_smile:

Using Tom’s workflow, I was also able to get the spreadsheet with the proper result:

Could you maybe try “Read as String” in the Spreadsheet File node and see if that helps? You can find that under “Add Options” :+1:

Hey,

in Toms workflow he uses the file I once opend in Excel (xxx96)

The raw file we recieve (xxx29) is the UTF-16 Little Endian, that still causes the problem.

Hi @JanMrlth1 - did you try that read as string option I posted as well?

yes, that returns the XMl file - also with the wrong encoding:

Which version of n8n are you running? :thinking: I can’t reproduce this.

n8n Version

1.1.1

Thanks for confirming @JanMrlth1! The Spreadsheet File node doesn’t let you set the encoding, but you could add two Move Binary File nodes before reading your file to handle this. The first one reads your UTF16 file, the second one writes a UTF8 file which can then be processed as usual:

This would give you proper umlauts again:

Hope this helps!

3 Likes

Thank you!!

1 Like

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