Spread 8.0 Documentation
GetArray Method
Support Options
ActiveX Reference > ActiveX Methods > GetArray Method

Glossary Item Box

GetArray Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns an array containing data from the sheet.

Syntax

C++

BOOL CSpreadSheet::GetArray(long ColLeft, long RowTop, const VARIANT& VarArray);

Visual Basic

fpSpread.GetArray(ByVal ColLeft As Long, ByVal RowTop As Long, ByVal VarArray As Variant) As Boolean

Parameters

The following parameters are available:

Parameter Description
ColLeft Specifies the column of the first cell to read into the array
RowTop Specifies the row of the first cell to read into the array
VarArray Array to contain the data returned from the sheet
The array specification is zero-based.

Remarks

Use the GetArray method to return data from the sheet into an array with a variable number of elements.

Before you call the method, you must declare the array as the type of array needed to contain the data to be returned from the sheet.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work. Specify the cell at which to start returning data using the ColLeft and RowTop parameters. The sheet returns data into the array starting at the specified cell, proceeding left to right and top to bottom, until the array is full.

As noted, for the VarArray parameter, the array specification is zero-based. For example, to return an array consisting of the 3×3 block of cells starting at cell A1, you would set the ColLeft parameter to 1, the RowTop parameter to 1, and the VarArray parameter to "array(2,2)".

Return Type

True if successful; otherwise, False.

See Also

Saving Data to an Array

Sheet property

SetArray method

DLL Correspondence

SSGetArray function

Copyright © GrapeCity, inc. All rights reserved.