I would like to export data to excel. Is it possible to create dynamically a tab text file, that can be opened from the webserver? (act as if it was a link to a file on the server...) how would that code look like? do u know a link, where I get more infomation about it? thx :-)
All you have to do is send a header to the browser in the following format:
header("application/vnd.ms-excel");
then just print out your file in a tab limited format.
make sure that you send the header before you print any information
John Joske
Didn't work with
But thx for the hint with the header. The folowwing script works perfectly:
<? header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: inline; filename=\"excel.xls\""); print "cell1.1\tcell1.2\r\n"; print "cell2.1\tcell2.2\r\n"; ?>
cheers louis