How to write data on ms excel
Hello How are all here.
I am working on an ASP.Net project using Visual Studio 2005 (or ASP.Net 2.0)
Now I want to write data on ms excel such that the data must be retrieved from database and fill the dataset (or collection) and write that data over ms excel.
The two tables are returned with name 'LoadOut' And 'InspPipes'. I want when this data is returned, an ms excel file must be opened with two sheets, having the names as the table names respectively. Then the columns and rows of each table must be written on each sheet of ms excel file respectively.
Now I have used 'Response.write' method to write the data over ms excel sheet. The problem is that only one sheet could be active and be written. If I want to make the other sheet active, then how can I do that? also how can I give the name of each sheet with respect to the table names?
I know the other way of using Microsoft.Office.Interop.Excel. However if someone can help me regarding Response.write, then I would like to appreciate him/her.