Posted 20 January 2022, 11:20 pm EST
Hi Javier,
We are sorry but C1Excel doesn’t have provide any method to load a 2d array so you need to do it cell by cell.
However, you can take a look at our latest excel library which is more feature-rich, faster & customizable as compared to C1Excel. You can download the GrapeCity.Documents.Excel NuGet package to get the library and implement your requirement as follows:
GrapeCity.Documents.Excel.Workbook workbook = new GrapeCity.Documents.Excel.Workbook();
var array2d = new int[2, 2]
{
{2, 3},
{2, 4},
};
workbook.ActiveSheet.Range[0, 0, array2d.GetLength(0), array2d.GetLength(1)].Value = array2d;
You can refer here for more information regarding our latest excel library.
https://www.grapecity.com/documents-api-excel
JFYI, our new excel library is a standalone product so you would need to purchase a license for the same.
Best Regards,
Kartik