I have an export funtion in php that exports a query to an Excel spreadsheet. I am running into a formatting issue. One of the columns is set as EMPLOY_ID and it typically has values such as 03632 or 33000. If the field has a value like 03632, Excel removes the zero and treats the value as a number. I have also tried adding a tick (') in from of the number, so Excel treats the data as text, and it works. The only problem is that the tick (') appears in the website.
Is there any way I can send the data to Excel as a text file, and not as numbers, so decimal values and zero padding are kept?
Thanks
Formatting problem in php when exporting query to Excel
Moderator: General Moderators