Creating an Excel worksheet from the ADO Record Set
Posted on 2007-03-21
I want to create an Excel work sheet from the content of the ADO record set.
On submit of the ASP page, I refresh the page with the content of the ADO record set into an html table in the ASP page. On a condition, I create a button to for exporting the record set data to Excel. After the page is refreshed, when the user click this button, I want to write the content of the record set to an Excel file i.e. giving the option for the user to save this data into their local drive. This will be client side activity.
Is it possible to use the data from ADO record set in client side?
I looked into the web but could not figure out the right answer. Can anyone suggest me to overcome this problem? If anyone could give the sample code, it will great.
The sequence of operations is:
1. On submit of the page, the page is refreshed with the data from the ADO Record Set.
2. While refreshing, a button will be created for exporting the data from the ADO Record Set.
3. When the user click on this button, the user should be prompted for the file name.
4. After the file name is given and clicked on the OK button, the file should be saved in the local drive of the user. (This should be standard windows save functionality).
Let me know if more information required.
Thanking you in advance.