8000 Can't get hebrew to display correctly in a generted CSV file · Issue #995 · exceljs/exceljs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can't get hebrew to display correctly in a generted CSV file #995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adame21 opened this issue Oct 24, 2019 · 1 comment
Open

Can't get hebrew to display correctly in a generted CSV file #995

adame21 opened this issue Oct 24, 2019 · 1 comment

Comments

@adame21
Copy link
adame21 commented Oct 24, 2019

Hello,

I've recently started using the lib and am loving the ease of use and options.

My only problem is that hebrew strings are not displaying correctly.

I have tried all kinds of encoding/decoding but nothing seems to work.

Does this lib support hebrew? if so, can you point me in the right direction to get it working?

What im doing right now is this:

                worksheet.addRow({
message:"משהו שכתוב בעברית" // this translates to: "something in hebrew" 
})

The CSV file gets generated perfectly, but what I get in the "message" field is something like this:
׳�׳©׳”׳• ׳©׳›׳×׳•׳‘ ׳‘׳¢׳‘׳¨׳™׳×

I hope this is enough information to resolve this.
Once again - loving this lib, thanks so much for making it.

Thanks :)

@ArtskydJ
Copy link
Contributor
ArtskydJ commented Oct 9, 2020

I think the problem is with the encoding. When you save it, try something like this:

const wb = new ExcelJS.Workbook();
const ws = wb.addWorksheet('wheee');
ws.getCell('A1').value = 'משהו שכתוב בעברית';
wb.csv.writeFile('test.csv', { encoding: 'UTF-8' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0