You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1.49
What version of Laravel are you using?
10.30.0
What version of PHP are you using?
8.2.3
Describe your issue
Large numbers starting at 12 digits get displayed as scientific notation (e.g. "1E+11"), even with column format "Text".
Large numbers starting at 16 digits get rounded to 15 digits, even with column format "Text".
Use case: I want to export serial numbers in a xlsx file that are often 16 digits. The last number gets rounded and therefore makes the serial number invalid. I couldn't find a workaround except adding a prefix like "A" before every number.
Possible solution: The column formats get applied after the rows are already inserted into excel (close function in Sheet.php), which converts the already broken number (scientific notation + rounded) into text. Instead, the column formats should be applied before the rows get inserted into excel (open function in Sheet.php), so that the number doesn't get rounded at all if the column format is "text".
How can the issue be reproduced?
Few examples that show the problem:
"10000000000000000" is displayed as "1E+16", but you can copy the correct number from the formula by clicking on the cell.
"10000000000000100" is displayed as "1E+16", but you can copy the correct number from the formula by clicking on the cell.
"10000000000000011" is displayed as "1E+16", but the formula field shows "10000000000000000".
"10000000000000001" is displayed as "1E+16", but the formula field shows "10000000000000000".
"10000000000000051" is displayed as "1E+16", but the formula field shows "10000000000000100".
What should be the expected behaviour?
Display the large numbers as they are if the column format is "text".
The text was updated successfully, but these errors were encountered:
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.49
What version of Laravel are you using?
10.30.0
What version of PHP are you using?
8.2.3
Describe your issue
Large numbers starting at 12 digits get displayed as scientific notation (e.g. "1E+11"), even with column format "Text".
Large numbers starting at 16 digits get rounded to 15 digits, even with column format "Text".
Use case: I want to export serial numbers in a xlsx file that are often 16 digits. The last number gets rounded and therefore makes the serial number invalid. I couldn't find a workaround except adding a prefix like "A" before every number.
Possible solution: The column formats get applied after the rows are already inserted into excel (
close
function inSheet.php
), which converts the already broken number (scientific notation + rounded) into text. Instead, the column formats should be applied before the rows get inserted into excel (open
function inSheet.php
), so that the number doesn't get rounded at all if the column format is "text".How can the issue be reproduced?
Few examples that show the problem:
"10000000000000000" is displayed as "1E+16", but you can copy the correct number from the formula by clicking on the cell.
"10000000000000100" is displayed as "1E+16", but you can copy the correct number from the formula by clicking on the cell.
"10000000000000011" is displayed as "1E+16", but the formula field shows "10000000000000000".
"10000000000000001" is displayed as "1E+16", but the formula field shows "10000000000000000".
"10000000000000051" is displayed as "1E+16", but the formula field shows "10000000000000100".
What should be the expected behaviour?
Display the large numbers as they are if the column format is "text".
The text was updated successfully, but these errors were encountered: