Spread Windows Forms 11.0 Product Documentation
GetArray Method (IArraySupport)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > IArraySupport Interface : GetArray Method
Starting model row index
Starting model column index
Number of rows to copy
Number of columns to copy
Gets an object array from a specified range of cells.
Syntax
'Declaration
 
Function GetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) As Object(,)
'Usage
 
Dim instance As IArraySupport
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim value() As Object
 
value = instance.GetArray(row, column, rowCount, columnCount)
object[,] GetArray( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

Parameters

row
Starting model row index
column
Starting model column index
rowCount
Number of rows to copy
columnCount
Number of columns to copy

Return Value

Two-dimensional object array[row,column] that contains tabular data
Example
FarPoint.Win.Spread.Model.IArraySupport.GetArray
FarPoint.Win.Spread.Model.IArraySupport ias;
ias = (FarPoint.Win.Spread.Model.IArraySupport)fpSpread1.ActiveSheet.Models.Data;
object[,] x = {{6.0, 5.0, 11.0, 7.0, 5.0, 4.0, 4.0}};
ias.SetArray(0, 0, x);
object[,] arr;
arr = ias.GetArray(0, 0, 1, 7);
MessageBox.Show("The last column in the array is " + arr.GetUpperBound(1).ToString());
Dim ias As FarPoint.Win.Spread.Model.IArraySupport
ias = FpSpread1.ActiveSheet.Models.Data
Dim x As Object(,) = {{2.0, 3.0, 9.0, 1.0, 8.0, 7.0, 5.0}}
ias.SetArray(0, 0, x)

Dim arr(,) As Object
arr = ias.GetArray(0, 0, 1, 7)
MessageBox.Show("The last column in the array is " & arr.GetUpperBound(1).ToString())
See Also

Reference

IArraySupport Interface
IArraySupport Members