Last post Oct 06, 2010 04:06 AM by CikaPero
Sep 27, 2010 03:04 AM|Sandy1234|LINK
Can anyone help me with SpreadSheetGear. I want to use this with my ASP.Net applications?
Oct 06, 2010 04:06 AM|CikaPero|LINK
for your Excel ASP.NET applications, you can also try this
Excel .NET library.
Here is a sample Excel C# code that exports
DataGrid to Excel:
// Get DataTable that DataGrid is bound to.
var dataTable = (DataTable)dataGrid.DataSource;
// Create new ExcelFile.
var ef = new ExcelFile();
// Add new worksheet to the file.
var ws = ef.Worksheets.Add(dataTable.TableName);
// Insert the data from DataTable to the worksheet starting at cell "A1".
ws.InsertDataTable(dataTable, "A1", true);
// Stream file to browser.
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=Employee.xls");