Page 1 of 1
convert data into excel sheet using php
Posted: Tue Mar 13, 2007 2:25 am
by vidyadoiphode
can anone tell me how to convert data into excel sheet?
Posted: Tue Mar 13, 2007 3:37 am
by mikeq
either write the file as CSV, Excel will open this no problem.
If you want to write a file as a "real" Excel file you will need to use something like
writeexcel package
http://www.bettina-attack.de/jonny/view ... riteexcel/
Posted: Tue Mar 13, 2007 3:57 am
by vidyadoiphode
tell me easiest way because i have so much less time.
csv is also allowed.
Posted: Tue Mar 13, 2007 4:18 am
by aaronhall
CSV it is then. Hop to it.
Posted: Tue Mar 13, 2007 4:20 am
by mikeq
No point in PMing me vidyadoiphode, better to ask all your questions here.
Posted: Tue Mar 13, 2007 6:03 am
by facets
Something like will get your started.
Code: Select all
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=file.csv);
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
Then echo back your variables.
./Will