is it possible to display data to excel???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaylin
Forum Commoner
Posts: 68
Joined: Fri Nov 18, 2005 4:44 am

is it possible to display data to excel???

Post by jaylin »

i use these code to export data to msexcel

Code: Select all

<?
header("Content-type: application/vnd.ms-excel"); 
header("Content-type: text/html; charset=iso-8859-1; application/x-msdownload\r\n");

header("Content-Disposition: attachment; filename=extraction.xls"); 
header("Pragma: no-cache"); 
header("Expires: 0"); 
$data = "hello\tworld";
print $data;
?>
is it possible to format the text? for example, color of the text, bgcolor of the cell, etc.

regards,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Not like that. Spreadsheet_Excel_Writer can perform that functionality.
Post Reply