ASP.NET - how to write data to an excel file
Asked By Sameer Khan on 10-Aug-12 07:41 AM
i have googled a bit to find a solution that shows me how to write the data to an excel file.
But mostly what i have found is there are external dll or tools to do so.
My application is in Asp.net mvc3 coded in C#.Net . I dont want to use the external dll's in my application. Is there any other method or logic to write the data into an excel.
Hemanth Kumar replied to Sameer Khan on 10-Aug-12 07:43 AM
Sameer Khan ,
You have to refer to the follwing links for Excel File Dumping
Jitendra Faye replied to Sameer Khan on 10-Aug-12 07:58 AM
.Net doesn't provide any predefined classes of method to write data to excel file,
for this you can show data in grid and you can export that data.
follow this article here you will get example-
messy leon replied to Sameer Khan on 11-Aug-12 01:50 AM
To write in excel file ..
DataTable.Value("column name","sheet name") = result
To export the datatable...
DataTable.Export "file path"
For more information read it http://www.dapfor.com/en/net-suite/net-grid/tutorial/data-sorting