C# Values from Array SpreadsheetGear API Sample
Excel-Compatible Samples for .NET
Description
SpreadsheetGear supports setting large, multi-cell range of cells using one line of code with a 2-dimensional array of objects. To do this set IRange.Value to an object[,] array of values, as demonstrated below.
To avoid possible exceptions, ensure your
object[,] array size matches the size of the range being set. If you specify an IRange that is larger than the object[,] in either dimension, an IndexOutOfRangeException will be thrown. If you specify an IRange that is smaller than the object[,] array, the operation will succeed but any object[,] values located beyond the bounds of the IRange will be ignored.