-
I'm exporting data from a MySQL DB to Excel using PHPSpreadsheet. The spreadsheet is working fine, the data is exporting correctly, however, the numbers are being stored as text. I can get PHPSpreadsheet to convert the cell to a number, but the number is still stored as text.
The code for the function (projectvalue2):
The number is formatted correctly with thousand separators and 2 decimal points. If the cell has a zero value as in no data from the database then it is stored as a number in the cell. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If the numbers are being stored as text, then it's because |
Beta Was this translation helpful? Give feedback.
-
I changed the data type in the database from a decimal(13,2) to a float and now it works. Thanks for pointing me in the right direction Mark. |
Beta Was this translation helpful? Give feedback.
I changed the data type in the database from a decimal(13,2) to a float and now it works. Thanks for pointing me in the right direction Mark.