Reputation: 15550
i created an application that takes the excell output of a table.There are long numbers in table cell.When i took the output the cells that have long numbers are seen like that 1234+E34.how can i fix that?Thanks for advance...
Upvotes: 0
Views: 559
Reputation: 11
This will display in excel as "12345678901234567890" (with Quotes)
To avoid this, Use intval(12345678901234567890) in php, This forces Excel to treat this number as an integer
Upvotes: 0
Reputation: 212412
So you're not actually writing an Excel file: It looks as though you're writing an HTML file but sending headers to the browser telling it that it's an xls file... Excel can then identify that HTML, and parse it into a structure that it can display.
You have a couple of alternatives.
The first is to create a genuine xls file rather than trying to con the browser and Excel. The Second option: instead of writing the value as
12345678901234567890
write it as
="12345678901234567890"
Upvotes: 1