I want to export my php web page to excel.
For that, I have found the following code which works but it has an issue.
Values in a column start with something like '00003421' in php but when it is exported in excel, it shows only '3421' in the cell. It ignores the zero values. Moreover, I want them in text data type.
How can I export the data in plain text format as it is (including zeroes)?
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=export.xls");
header("Content-Transfer-Encoding: BINARY");
It's tabular data with 4 columns and around 20,000 rows.