Hello, i have a web page that works with a database, and i print database reports, but now i need a button,
that exports those reports to excel, does anyone now how to do this, im using plain php, plz i need help thnxs,
im not too knowledgeable with php, so i need help to understand how to do this
THNXS.
HELP with a Export to Excel Button
Moderator: General Moderators
-
StaticConvulsioN
- Forum Newbie
- Posts: 3
- Joined: Thu Apr 26, 2007 12:30 pm
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
The simplest way to do it is to export as a CSV (comma-separated values) file, which is just a plain text file. If I remember correctly, Excel is pretty lenient when it comes to format, but a row would normally have its values enclosed in double quotes and separated by commas or tabs. Rows are terminated with \n or \r\n.