> Could anyone help me out with how to print the entire contents of a 
> database as an Excel file? I'm familiar with the header:
> 
> header("Content-Type: application/vnd.ms-excel");
> 
> just not sure how to go about it beyond that. I have this code and
> am not sure what do do after it. Thanks.

Excel spreadsheets are in a proprietary format as far as I know.

However, if you output the database one line = one row, and tab delimit
the lines, Excel will notice you're importing a text file and give you
some appropriate options (select delimiter, etc).

I'd go for tab delimiting over comma delimiting, since your text fields
will probably contain commas but will *very* *exceedingly* rarely have
tabs.

I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're
watching ;)) - I can post it if you want to.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to