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
Save a cell with number having comma separator for 1000's #216
Comments
@ashwin-ragha1 Export2Excel.js is interpreting the cell as text. The relevant line in the generateArray function is
This is a super simple check, and it works for very basic data like
If you had a list of cases to consider, we could devise an appropriate technique. The larger problem (of determining whether a string of characters is text or numeric or datetime) is much more challenging since it would have to be locale-specific (for example, in some locales, the thousands separator is |
Hi, I modified your suggestion a bit as I'm also having other cell values with a comma which are string. var cellValueNoCommas = cellValue.replace(/,/g, ""); Now even though the values in that particular column are right - aligned, I lose the comma. I would like to export the values with a comma. Is there any way of doing that? |
With the same files as above - xlsx.core.min.js I also notice that when we run the export code in IE9, it doesn't work. It throws an error ArrayBuffer is undefined. So is there an alternate way to get it working in IE9? |
Hey I have a similar issue to this, where commas are causing issues (though I'm not trying to export - just trying to read). @ashwin-ragha1 - are the files that you mentioned part of this repository or taken from elsewhere? @SheetJSDev - if I wanted to solve my issue, should I be looking into the |
To write cells with thousands separators, after parsing you can set the individual cell's |
Hi,
I'm having the following files in my page ...
xlsx.core.min.js
Blob.js
FileSaver.js
Export2Excel.js
And I'm calling the function export_table_to_excel by passing html table which has a cell that contains a number with comma separator... e.g. 1,000.00
When I open the exported excel file, I find that this cell is left aligned and I want to make it right aligned.
Please help.
The text was updated successfully, but these errors were encountered: