Jump to content

Generate CSV file with dynamically genrated sheets


tanveer

Recommended Posts

Hi all:
I found the code on how to generate the CSV file by running queries in mysql database and giving that CSV file to clients for downloading. 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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.