Jump to content

[SOLVED] how to export mysql query result to open office spreadsheet ?


anatak

Recommended Posts

Does anybody have any experience exporting a mysql query result to open office spreadsheets ?

I would like to build a php application that export queries into a spreadsheet (excell of open office) My preference is open office because open office is free to use.

 

Any ideas how to start on this ?

 

kind regards

anatak

Link to comment
Share on other sites

It's not too hard. You'll want to look up how to export to a file, and then you'd write all of your results where each column would have a \t after it and each row would have a \r after it. When you go to import it into your spreadsheet program, it'll see it as a comma-delimited file (the \t for tabs) and should import it without a problem.

 

If you want a more concrete description (with code) let me know.

Link to comment
Share on other sites

Hey JD,

 

Thanks for the pointers. The project that needs this is still not sure and it will be at least a month after starting that I ll be trying to do this.

At that time I ll post an update in this topic.

 

It looks like I first need to export to a comma delimited file and then import in the spreadsheet. Is it possible to generate a spreadsheet file directly from the Mysql result with php ?

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.