Pages

Thursday, October 24, 2013

ASP.net Export to excel.

Hello everyone,
 
Today I  am explaining about different approaches for exporting data from ASP.Net web page to Excel.
 
So, there are 3 approaches by which we can export data to excel.
  1. Export using HTML writer.
  2. Export With the help of Telerik controls.
  3. Export using Microsoft.Office.Interop.Excel.
 
1. Export using HTML writer: very simple approach but the problem is you can export, but you can not import using OLEDB connecting. If you just want to export data and you are sure that it is never going to be imported than you can use this approach.

2. Export With the help of Telerik controls:
This approach is also very good approach, but limitation is, If you want more than one sheet in out file then as per my understanding it is not possible.
  
 3.Export using Microsoft.Office.Interop.Excel:
This approach works always but need little hard work.
 
 
 
 
For more details on this you can ask questions in comment section. 
 
Related code will post soon on this blog Keep tune :)

1 comment:

  1. Hi Amrit, thanks for sharing knowledge with us.
    dude can u share the source code to perform this functionality.

    ReplyDelete