Output data to a local client directory
Posted on 2003-03-14
I've recently 'inherited' a web app written in CGI, which queries a database and displays the results on a browser page.
I need to add some functionality to allow the user to download the results of the query to their local drive. I'm not sure what format this file should be at the moment.....Excel would be perfect, but I'd settle for a csv file if that is easier.
How do I go about doing this?
Ideally I'd like to prompt the user to select a file location using a common dialog, and then have the query results saved to the appropriate file format in the appropriate location.