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
{{ message }}
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.
The method PHPExcel_Cell_DefaultValueBinder::dataTypeForValue() tries to convert strings that contain numeric to numeric
It's a good thing, however if the input string is something like "0101010101", the resulting numeric in Excel will be 101010101, therefore the leading 0 has disappeared (because it has been considered as a number)
I think it's too much agressive, because there's here an information that has disappeared (the leading 0)
In fact, I get from database a phone number, that is a string in database: "0101010101", I put that value into an Excel Cell, and obviously, I don't want this value to be changed
As a result, I would add a condition for converting a string to a numeric:
if the string only contains number (not decimal), and begins with a leading 0, it must not be converting to decimal
What do you think of it?
The text was updated successfully, but these errors were encountered:
The method
PHPExcel_Cell_DefaultValueBinder::dataTypeForValue()
tries to convert strings that contain numeric to numericIt's a good thing, however if the input string is something like
"0101010101"
, the resulting numeric in Excel will be101010101
, therefore the leading0
has disappeared (because it has been considered as a number)I think it's too much agressive, because there's here an information that has disappeared (the leading
0
)In fact, I get from database a phone number, that is a string in database:
"0101010101"
, I put that value into an Excel Cell, and obviously, I don't want this value to be changedAs a result, I would add a condition for converting a string to a numeric:
if the string only contains number (not decimal), and begins with a leading
0
, it must not be converting to decimalWhat do you think of it?
The text was updated successfully, but these errors were encountered: