Skip to main content
December 8, 2007
Answered

"One Click" export to Excel?

  • December 8, 2007
  • 2 replies
  • 573 views
Not sure if this is the correct forum so please excuse me if I got it wrong.

I am wondering if there is a way to download the contents of a table (mysql/php) by placing a link or button on a webpage?
Currently I am able to export the table from within phpMyAdmin as a .xls file but it is a rather circuitous process and I was wondering if there is a way to set this up to work from a link or button within a DW8 page?

Again sorry if this is not the right place to ask such a question.
thanks for any help that may be forthcoming,
Graham
This topic has been closed for replies.
Correct answer
Hi folks,
Thanks for the replies, I have managed to solve this by using a php class that generates a csv file.
Appreciate the suggestions. :-)

2 replies

Correct answer
December 14, 2007
Hi folks,
Thanks for the replies, I have managed to solve this by using a php class that generates a csv file.
Appreciate the suggestions. :-)
Participant
December 8, 2007
Hi Graham,

You can export the table in a csv format and then open up Excel and Import that CSV file inside excel that is about it for the solution part.

If you want an application created (PHP FILE) which will just have a button when you click that the file gets exported into excel I can do that for you (just private message me).

Let me know if it helps.
Participant
December 13, 2007
HI,

I don't know PHP, but, in VBScript, you can add the following:

<% Response.ContentType = "application/vnd.ms-excel" %>

at the top of a page, then, simply lay out a table with headers, plainly, the way the Excel columns would look...and, this will prompt you for a filename to save, and will generate an excel spreadsheet for you from the data you display in the table layout.

Hope this helps!

Juan C. Vega
Intelligentsia