Hi, WHAT I AM CURRENTLY DOING 1. I am generating a report using data from an RDBMS (using JDBC:ODBC); I display this data on the browser through a servlet. 2. If the user wants to export this data, I put the results of that report into the Excel file. 3. To do this, I am specifying a DSN and name range, and sending data into that from my servlet (using JDBC:ODBC).
THE PROBLEM I would like the user to pick a directory and file name for the Excel file on the fly (using the HTML tag <INPUT type=file>).
Once the user picks a file name, how can I export the data into this particular file, rather than what the DSN specifies?
I am not sure whether I understand ur problem correctly. You are displaying some data in html format to the user. The user should be able to save the data shown in html format to his local hard disk. Is this the requirement? If so, try this. When the user wants to save the data to his local drive, you could save the data to a temp file in the server (the machine where web server is running) and give a link to the user. He should be able to download the file. The file can be deleted at the end of the session, or on the next hit to the servlet by the user or whatever option is convenient for you.