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.
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 attend4days leftRegister
Roy S194 reputationPosted Jun 22, 2010, 9:26 AM EDT
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
harry peter7 reputationPosted Jul 26, 2010, 12:04 AM EDT
http://www.e-iceblue.com/Introduce/excel-for-net-introduce.html
Jack Baker3 reputationPosted Feb 20, 2011, 6:05 PM EST
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");