View Full Version : download to excel

03-12-2003, 08:25 PM
I have a table that is displayed that I would like the users to be able to download to excel... this table comes up in a new window that does not have the file-edit-view menu on it. What is the easiest way to do this? I was thinking of converting it to XML, but how do I make a button that will allow the user to download a file and make the file at the same time.


03-13-2003, 11:28 PM
There's a number of possible ways. What I'd do is start with a neutral data format to store the information (XML would be ideal); then you need two processes - one creates an HTML page (simple enough) and the other creates an excel spreadsheet ( .. er .. )

Do you have a plan for server-generating Excel documents? I don't know - I'd imagine MSDN would know, and that it would involve installing IIS-server extensions.

But server-generating a CSV file would be reasonably simple - you just parse your XML into a csv text-file which you then prompt for download.

I can give more info on most of this (except the excel generation)