I have a big problem with exporting my table to Excel file format.
Firstly I created code which runs on server and allows me to export data to Excel. Due to the fact that my table is created dynamically from the database there is nothing WITHIN the table at that stage, so no data were exported.
So, a new idea of mine is: grab the page just after compiling and building it on the server, but before sending it to the browser. Target THE table and source its data using function on server. Finally export data to Excel, and send the page to the browser. Now. Is it possible? And if yes, then how?
I am beginner in programming world so any constructive suggestions and criticism would be highly appreciated. I would not mind any hard code examples ;)
What you need to do is export your query results in a .CSV file. CSV files can be opened in Excel no problem at all. http://wiki.asp.net/page.aspx/401/export-to-csv-file/ This shows you how to export into a .CSV format.