We recently upgraded to 5.3.2 from 5.2.1. We are now experiencing the same issue as below
See http://guriddo.net/?topic=excel-export-rounding-values.
I have tracked the issue to the use on “excelParsers” in the newest version. While these are helpful I do not believe the regex’s that were used to detect certain number formats were implemented correctly. I updated the code with the following and it appears to fix the issue.
{ match: /^\-?\d{1,14}$/, style: 65 }, // Numbers without thousand separators
*Updated : checks that value is less than 15 digits so it can be handled by Microsoft Excel correctly and not rounded off.
{ match: /^\-?[\d]{1,3}(,[\d]{3})*$/, style: 63 }, // Numbers with thousand separators
*Updated: to correctly check for a number that is separated by commas, the regex above should catch any number less than 15 digits that is not comma separated
{ match: /^\-?[\d]{1,3}(,[\d]{3})*(\.[\d]+)?$/, style: 64 }, // Numbers with 2 d.p. and thousands separators
*Updated: Same as above but addition of decimal point support.
Note: The longer numbers that are separated by commas/decimal points will still get rounded by Excel.
Please let me know if this change can be incorporated and if we can get a special build in the meantime. It appears the original fix to this problem is still in the baseline but the new excelParsers logic is not allowing the original fix to be executed.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top