Hi All,
I need to export data from sql server to excel sheet directly on an event. Any idea?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vijay YadavPosted Jul 23, 2012, 7:27 AM
Santhosh Kumar JayaramanPosted Jul 23, 2012, 7:14 AM
http://royalarun.blogspot.in/2012/01/export-datatable-to-excel-in-c-windows.html
Santhosh Kumar JayaramanPosted Jul 23, 2012, 7:12 AM
So better change the xls to xlsx.
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=Reports.xls");
Change it to
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=Reports.xlsx");
Vijay YadavPosted Jul 23, 2012, 7:09 AM
Thanks for your reply. I want to insert lac of data into one excel file. How to do that? I am just able to insert 65536 rows in a file, can we use another sheet for that I tried this as well but didn't workout for me. And its a window application. Any Idea?
Santhosh Kumar JayaramanPosted Jul 12, 2012, 9:22 AM
http://www.c-sharpcorner.com/UploadFile/1a81c5/export-datatable-to-excel-with-formatting-in-C-Sharp/