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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Apr 23, 2014, 2:33 AM EDT
Please refer the link
http://mvc4beginner.com/Sample-Code/ImportExportExcelData/MVC4-Export-Data-to-Excel.html
Rahul PrasadRank #2,557 · 546 reputationPosted Apr 23, 2014, 6:52 PM EDT
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
Neboja12 reputationPosted Jul 21, 2014, 1:13 AM EDT
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.