Jump to content

Archived

This topic is now archived and is closed to further replies.

onlyican

Export to Excel

Recommended Posts

Hey guys

I have a challenge in front of me

I am creating a script, which allows the user to add sales of products, add stock to DB bla bla bla

But what they want is a way to export the results into a (sorry in advanced) Micro N Soft Excel Spreadhseet (I did say sorry)

Any suggestions on writing Excel Spreadhseets in PHP

Share this post


Link to post
Share on other sites
Easiest way is to create a CSV file which Excel will open just by double-clicking on the file icon.

Share this post


Link to post
Share on other sites
frwrite() and save as .csv file.  If you need a header just store in a variable and prepend to the loop of your results.  It's just a few lines of code.

Share this post


Link to post
Share on other sites
Thankx I will look into COMS
(And I didn't think I could add cell formatting in CVS, thats why I called it comma Seperated values)

Share this post


Link to post
Share on other sites

×

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.