Click to See Complete Forum and Search --> : Excel Viewer?


Antinaris
12-05-2003, 04:13 AM
I am trying to view excel sheets via PHP. Any idea what is the best way to do that?
Thanks.

Pittimann
12-05-2003, 05:15 AM
Hi!

You can save your Excel sheets as .csv files (comma separated values). These ones can be easily used to display there contents by means of php...

There should be more professional solutions, but I don't know any :rolleyes:

Cheers - Pit

patejl
12-05-2003, 07:00 AM
hey,
try to use this sample of code...

header("Content-type: application/vnd.ms-excel");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-type: application/octet-stream");
# replace excelfile.xls with whatever you want the filename to default to
header("Content-Disposition: attachment; filename=whatever_you_want.xls");
header("Pragma: no-cache");
header("Expires: 0");

and here put your rest of code ...

cheers