I have a 2 dimensional array, I want to convert it to an Excel document using C#.
Any clue!
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.
Jack BakerPosted Feb 20, 2011, 11:05 PM
http://www.devtriogroup/ExcelJetcell
It read write excel XLSX XLS files. Very easy in use API function set + C# examples.
See C# code to write an array to Excel file:
using DTG.Spreadsheet;
...
ExcelWorkbook Wbook = new ExcelWorkbook();
Wbook.Worksheets.Add("Excelarray");
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
{
Wbook.Worksheet[0].Cells[i,j].Value = arr[i,j];
}
Wbook.WriteXLSX(@"ExcelSpreadsheet.xlsx");
harry peterPosted Jul 26, 2010, 4:04 AM
http://www.e-iceblue.com/Introduce/excel-for-net-introduce.html
Roy SPosted Jun 22, 2010, 1:26 PM
http://support.microsoft.com/kb/302084
Or you could use gembox.spreadsheet which is faster (266 times faster), easier to use and just better:
http://www.gemboxsoftware.com/GBSpreadsheet.htm