The issue is not that my value is not already a string but that the the export to excel code is treating my number as a ‘number’ instead of a string. Basically when the value in exported the cell is being marked as a ‘number’ cell instead of an ‘inlineStr’.
To fix this i propose the follow change update the regex check to insure values that are larger than the IEEE 15 digits are treated as strings as to not have them be truncated in the exported file.
First of all thank you for finding this problem and supply a fix for it – much appreciated.
The only that stopped me to apply a fix is that the exported file is read correct in Linux Office Packages – like LibreOffice and OpenOffice, but despite this fact, I have made the fix suggested from you, since the most users using excel files origin from Microsoft Excel.
I have refine your fix, since in case when the user use a custom formatter which return number the logic does not accept it. This can be easy seen if you replace in your code: