Spread ASP.NET 6.0 Product Documentation
GetArray Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > IArraySupport Interface : GetArray Method


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

Glossary Item Box

Gets an object array from a specified range of cells.

Syntax

Visual Basic (Declaration) 
Function GetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) As Object(,)
Visual Basic (Usage)Copy Code
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)
C# 
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] containing tabular data

Example

This example sets an array into the model.
C#Copy Code
FarPoint.Web.Spread.Model.IArraySupport ias;
ias = (FarPoint.Web.Spread.Model.IArraySupport)FpSpread1.ActiveSheetView.DataModel;
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);
Response.Write("The last column in the array is " + arr.GetUpperBound(1).ToString());
Visual BasicCopy Code
Dim ias As FarPoint.Web.Spread.Model.IArraySupport
ias = FpSpread1.ActiveSheetView.DataModel
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)
Response.Write("The last column in the array is " & arr.GetUpperBound(1).ToString())

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.