Click or drag to resize

IWorksheet InsertArray Method ( DateTime , Int32, Int32, Boolean)

Imports an array of DateTimes into worksheet.
Examples
The following code illustrates how to Imports an array of DateTime values into a worksheet with the specified row and colum:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Initialize the DateTime Array</para><para>DateTime[] arrayDate = new DateTime[4] { DateTime.Parse("06:45"), DateTime.Parse("08:30"), DateTime.Parse("09:40"), DateTime.Parse("10:30") };</para><para>//Insert the DateTime Array to Sheet</para><para>worksheet.InsertArray(arrayDate, 1, 1, true);</para><para>//Save to file</para><para>workbook.SaveToFile(InsertArray.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
int InsertArray(
	DateTime[] arrDateTime,
	int firstRow,
	int firstColumn,
	bool isVertical
)

Parameters

arrDateTime
Type: System DateTime
Array to import.
firstRow
Type: System Int32
Row of the first cell where array should be imported.
firstColumn
Type: System Int32
Column of the first cell where array should be imported.
isVertical
Type: System Boolean
True if array should be imported vertically; False - horizontally.

Return Value

Type: Int32
Number of imported elements.
See Also