download datatable into excel format using c#
hello! i have accessed the datatable from server and now i want that user may download it in excel form please help me for coding
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.
Sunny SharmaPosted Oct 3, 2013, 8:29 AM
Use the code below:
----------------------------------
-----------------------------------------------------
I've also attached a compiled DLL of the same code to make you go with ease.
Just refer the DLL file in your project and call it like:
DtToExcel.GetInExcel(mydataTable,myFileName);
-----------------------------------------------------
Hope it helps :)
Sanjeeb LenkaPosted Oct 3, 2013, 8:24 AM
Refer to this link it may help you
http://www.c-sharpcorner.com/UploadFile/1a81c5/export-datatable-to-excel-with-formatting-in-C-Sharp/