Generate CSV file with dynamically genrated sheets

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
tanveer
Forum Newbie
Posts: 9
Joined: Sat Mar 27, 2004 11:07 am

Generate CSV file with dynamically genrated sheets

Post by tanveer »

Hi all:
I found the code on how to generate the downloadable CSV file by running queries in mysql database. No problem, if using a single query.
What my problem is: The data I need are stored partially in 5 tables. So to fetch all data, I have to write more than one query as u guess, so I want to generate excel sheets dynamically and put the data from each table to a new sheet in that Excel file.
In a new excel file, by default, there are 3 sheets(sheet1,sheet2,sheet3) included. Now, I want to write table1's data to sheet1, tables2 data to sheet2 and so on. If needed to generate more sheets and write on them.
Is it possible?
Moreover, I saw some are using PEAR packages to resolve this. I haven't worked with PEAR before so have no idea on how to install that on my SERVER which is windows based.

Waiting for your kind reply.

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

Post by feyd »

I am not aware of any controls in CSV to dictate what sheet to place data on therefore can only recommend the PEAR package you are referring to.
Post Reply