Click or drag to resize

XlsWorksheet InsertArray Method ( Object , Int32, Int32)

Imports an array of objects into a worksheet.
Examples
The following code illustrates how to Imports a two-dimensional array of Object into a worksheet with the specified row and column:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Initialize the Object Array</para><para>object[,] arrayTwoDimen = new object[3, 2] { { "AND", "OR" }, { "NAND", "XOR" },{ "NOR", "NOT" } };</para><para>//Insert the Object Array to Sheet</para><para>worksheet.InsertArray(arrayTwoDimen, 1, 1);</para><para>//Save to file</para><para>workbook.SaveToFile(InsertArray.xlsx");</para>

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public int InsertArray(
	Object[,] objectArray,
	int firstRow,
	int firstColumn
)

Parameters

objectArray
Type: System Object
Object array.
firstRow
Type: System Int32
The row number of the first cell to import in.
firstColumn
Type: System Int32
The column number of the first cell to import in.

Return Value

Type: Int32

Implements

IWorksheet InsertArray( Object , Int32, Int32)
See Also