Jump to content

export mysql data to existing xls file


ozorowsky

Recommended Posts

As far as I know, you can't create a true .xls file using php/MySQL. What you CAN do is generate a text file from the MySQL data. And then you can IMPORT that text file into Excel.

 

Assuming you know how to get the data you want out of your database, you'll find all you need to know about creating a text file in the manual - check fwrite for that.

Link to comment
Share on other sites

I don't have to create an xls file exactly, just something that will print out EXACTLY like what I currently have. Any way I could send you the file I have through email?

 

As far as I know, you can't create a true .xls file using php/MySQL.  What you CAN do is generate a text file from the MySQL data. And then you can IMPORT that text file into Excel.

 

Assuming you know how to get the data you want out of your database, you'll find all you need to know about creating a text file in the manual - check fwrite for that.

308060[/snapback]

 

Link to comment
Share on other sites

Any way I could send you the file I have through email?

No thanks.

 

The way we all learn is by sharing knowledge. If you want to post some information about your database structure, and some information about what you want in the .csv file that will result from querying it and creating a text file, then everyone here can contribute to the solution you're working towards, and anyone who reads the thread (now or in future) will see how a particular problem was solved.

 

That's what these forums are all about: shared problems, shared solutions.

Link to comment
Share on other sites

Fair enough. I created this: http://rrtools.redirectme.net/Website/timesheet.html with a html table. What I want to do is have pretty much the timesheet there and have values populated then formatted so that it will print out on one page. Right now this table is alittle too big

 

No thanks.

 

The way we all learn is by sharing knowledge.  If you want to post some information about your database structure, and some information about what you want in the .csv file that will result from querying it and creating a text file, then everyone here can contribute to the solution you're working towards, and anyone who reads the thread (now or in future) will see how a particular problem was solved. 

 

That's what these forums are all about: shared problems, shared solutions.

308083[/snapback]

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.