I have a ASP.NET and VB.net website. The back end is SQL Server 2008. I would like help with the code for a button the user can click that will export all their data to excel for back up purposes. All their data is held in about 10 tables. I would like the user to click once and for the code to run 10 sets of SELECT FROM SQL that then respectively populates (and renames) 10 sheets within one Excel workbook and renames the workbook with the User's Name and the Date and emails to them or download depending on what they choose to do.
The user will also have the option to save to CSV (if they do not have excel) but this will have to save out 10 individually named csv's and then email or download.
Hope you can help