Welcome to Gaia! ::


Blessed Seeker

5,450 Points
  • Forum Regular 100
  • Conversationalist 100
  • Forum Sophomore 300
Hi! I'm new to php and I kinda got stuck with outputing data from a database into an excel file as part of reporting. Anyone care to help?

I can do this in a breeze in ASP....but in php....nothing I do seems to work...

help.
Majah
Hi! I'm new to php and I kinda got stuck with outputing data from a database into an excel file as part of reporting. Anyone care to help?

I can do this in a breeze in ASP....but in php....nothing I do seems to work...

help.
easy way to simplifi things ... instead of outputing directly to a excel file ... output to a CSV file ... excel can import it as well as many other programs

Blessed Seeker

5,450 Points
  • Forum Regular 100
  • Conversationalist 100
  • Forum Sophomore 300
Quote:
Majah
Hi! I'm new to php and I kinda got stuck with outputing data from a database into an excel file as part of reporting. Anyone care to help?

I can do this in a breeze in ASP....but in php....nothing I do seems to work...

help.
easy way to simplifi things ... instead of outputing directly to a excel file ... output to a CSV file ... excel can import it as well as many other programs


How do I output it in a CSV file? Care to share code snippets? or point me somewhere which explains how?

I tried outputing in a CSV file...but it goes out in the browser and not in the file.
Quote:
Quote:
Majah
Hi! I'm new to php and I kinda got stuck with outputing data from a database into an excel file as part of reporting. Anyone care to help?

I can do this in a breeze in ASP....but in php....nothing I do seems to work...

help.
easy way to simplifi things ... instead of outputing directly to a excel file ... output to a CSV file ... excel can import it as well as many other programs


How do I output it in a CSV file? Care to share code snippets? or point me somewhere which explains how?

I tried outputing in a CSV file...but it goes out in the browser and not in the file.
put this before an thing is outputed

header("Content-type: application/csv" wink ;


http://filext.com/detaillist.php?extdetail=CSV

you can also change any of thease mimetypes

Blessed Seeker

5,450 Points
  • Forum Regular 100
  • Conversationalist 100
  • Forum Sophomore 300
Thanks...I will try this later *kisses u* 4laugh

-----

And oh...If anyone got some more tips...I will be very happy to listen.
Quote:
Thanks...I will try this later *kisses u* 4laugh

-----

And oh...If anyone got some more tips...I will be very happy to listen.


forgot to mention you might want this also

header('Content-Disposition: attachment; filename="downloaded.cvs"');
I've seen an Excel file reader for PHP, but I can't remember if it also supported making them...
Quote:
I've seen an Excel file reader for PHP, but I can't remember if it also supported making them...
I know phpmyadmin has one built in and someone could always look through there code ... and I know it's possable and probley easy ... but I sugested the CSV because it would be easyer to transfer to other programs besides excel if such a need should ever arise

always good to program sevral steps ahead

edit http://php.resourceindex.com/detail/02384.html
I think this is the one your talking about which doesn't do output only input

however I did find something in PEAR
http://pear.php.net/package-info.php?pacid=156

Blessed Seeker

5,450 Points
  • Forum Regular 100
  • Conversationalist 100
  • Forum Sophomore 300
Wow thank you thank you! I kissed you again heart
Quote:
Wow thank you thank you! I kissed you again heart


It won't let me kiss the same person twice...

Blessed Seeker

5,450 Points
  • Forum Regular 100
  • Conversationalist 100
  • Forum Sophomore 300
Quote:
Quote:
Wow thank you thank you! I kissed you again heart


It won't let me kiss the same person twice...


Huh? I was able to kiss the same person as many as I want. whee
Quote:
Hi! I'm new to php and I kinda got stuck with outputing data from a database into an excel file as part of reporting. Anyone care to help?

I can do this in a breeze in ASP....but in php....nothing I do seems to work...

help.


try this program , If it doesn't work, then ask again.

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum