currency formatting does not work #267
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#267
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have cell configured as below
{v:1222.34, z: '$#,##0'}
And I used the write function to xlsx file.
It does not do any formatting. But it works fine for {v:12.34, z:'0.00%'}, with percentage.
I'm referring the library this way. http://oss.sheetjs.com/js-xlsx/xlsx.core.min.js
This is a problem for me as well. Really need this!
Agreed! Would really love to see this 👍
+1
I had this same problem, you can solve with parseFloat
cell.t = 'n';
cell.z = XLSX.SSF._table[4];
cell.v = parseFloat('2054.78');
There is no need to manually add to the string table anymore. Just assigning the
z
property to the number format is sufficient -- the writers will automatically build the table for you.I apologize for the bump and perhaps even tangent, but is it possible to combine the Intl object's properties to dynamically format currency based on locale and currency codes?
I've tried to write to a some of the properties of the
cell
but to no avail. Thanks!