By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

How to export multiple tables into an excel file with separate sheet for each table?

P: 4
Hi,

I have a database with 10 tables and I want to export all table data into excel file.But there should be only one excel file with different sheets in it, each containing different tables data.
Feb 24 '11 #1
Share this Question
Share on Google+
6 Replies


100+
P: 1,059
try PHPExcel

Also can export as CSV which easily can be open with excel software
Feb 24 '11 #2

P: 4
Hi Johny,

Thanks for the reply.I want simple code to place in my code not the folder with files in it.I really appreciate the help
Feb 24 '11 #3

code green
Expert 100+
P: 1,726
If by Excel file you mean '.xls', then simple HTML tables can be written as a string, then write the string to a file and save as xls.
Feb 24 '11 #4

P: 4
Hi,

Thank you.Worked on it and I a getting the .xls file with all data in to one sheet only.But I want first table data in one sheet and second table data in 2nd sheet.....all in one abc.xls file only.
Feb 24 '11 #5

code green
Expert 100+
P: 1,726
Then I would advise using the class johny10151981 recommended.
Or any other PHP Excel class, as I don't know of a simple solution
Feb 24 '11 #6

P: 4
ok thanks for the help.will include the classes
Feb 24 '11 #7

Post your reply

Sign in to post your reply or Sign up for a free account.