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
Character and compatibility bugs with XLS and CSV exporting #20
Comments
OK so first, the issue is with this plugin https://github.com/highslide-software/export-csv/ , I'm merely using it in under a unified interface. So, about bug 1: I tried to had a BOM ( https://en.wikipedia.org/wiki/Byte_order_mark ) and that fixed your issue. It have been reported already, see highcharts/export-csv#27 . Regarding bug 2, I can't seem to be able to reproduce this issue here: Bug 3, yeah, it's a known issue. It has been reported and it can't be fixed. See #13 and highcharts/export-csv#41 . |
Where did you put the BOM? Can you show example code? I tried to edit the export-csv.js file by adding a.href = 'data:text/csv;charset=utf-8,%EF%BB%BF' + this.getCSV().replace(/\n/g, '%0A'); but it didn't help. |
I didn't try to patch the library, I just added the BOM using Notepad++. I found out that there was existing issues afterwards. Seems like your version is a tad old. On the
Be aware that on raw content, the BOM shouldn't be URL-encoded. |
Sorry, yeah, the issue is in my code, not |
Prepend
That fixed the issue here. I don't have the time to do a proper fix at the moment, but will do. |
Thanks, it fixed the BUG 1 and BUG 2 also on my side. You sure that the BUG 3 cannot be fixed? Is it an Excel issue or export-csv issue? |
I may be wrong, I'm no Excel expert. The format used isn't the same as XLS, hence the warning. From what I can grasp, that some Office XML format ( https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats ). So, yeah, it's probably possible to write a correct Office XML file, but it's extension would have to be The easier format openable with Excel would probably be ODS, but that'd be some work. You're welcome to try though. |
Here is Microsoft's official answer and solution to the error message given by Excel . The issue is caused by a new security feature in Excel. It can only be fixed by changing Windows' registry settings (I tested it and it works). http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx |
Release for this issue has been published: https://github.com/A----/highcharts-export-clientside/releases |
I found the following bugs when testing the client-side export module plugin with CSV and XLS exporting, can you please fix them?
BUG 1
With a particular amount of categories and series data scandinavian characters (ä, ö) and euro sign (€) are not displayed correctly in the XLS file
http://jsfiddle.net/pscjzhe4/208/
However, strangely it starts working if you add more categories and series data:
http://jsfiddle.net/pscjzhe4/209/
BUG 2
Scandinavian characters (ä, ö) and euro sign are not displayed correctly at all in the CSV file (no matter if you have more or less categories and series data in the CSV file
http://jsfiddle.net/pscjzhe4/210/
BUG 3
If you open the exported XLS file in Excel 2013 you'll get an error message saying that "The file format and extension of [filename].xls don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" If you click Yes, it will open the file in Excel. However, it always shows this error message when trying to open the exported XLS file, so it's just annoying and confusing for users to see it every time.
The text was updated successfully, but these errors were encountered: