i have one table data in my database .the table data export into excel
plz help me
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.
NebojaPosted Jul 21, 2014, 5:13 AM
var workbook = new ExcelFile();
var worksheet = workbook.Worksheets.Add(myDataTable.TableName);
worksheet.InsertDataTable(myDataTable, new InsertDataTableOptions("A1") { ColumnHeaders = true });
// Stream an new excel file from MVC controller to the client's browser.
workbook.Save(this.Response, "DataTable.xlsx");
This API comes from a .NET library which processes an Excel type workbooks.
Rahul PrasadPosted Apr 23, 2014, 10:52 PM
http://www.codeproject.com/Tips/750246/Export-Data-from-Database-Table-to-Excel-File-in-A
http://www.c-sharpcorner.com/UploadFile/9c6206/export-data-from-database-table-to-excel-file-in-Asp-Net-mvc/
http://www.e-iceblue.com/Knowledgebase/Spire.DataExport/Program-Guide/How-to-Export-Datatable-to-Excel-through-DataGridView.html
hope one of them gives you a solution.
regards
Lakshmanan Sethu SankaranarayanPosted Apr 23, 2014, 6:33 AM
Please refer the link
http://mvc4beginner.com/Sample-Code/ImportExportExcelData/MVC4-Export-Data-to-Excel.html