Spread ASP.NET 6.0 Product Documentation
GetArray(Int32,Int32,Int32,Int32,Boolean) Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class > GetArray Method : GetArray(Int32,Int32,Int32,Int32,Boolean) Method


row
Row index of the cell from which to read into the array
column
Column index of the cell from which to read into the array
rowCount
Number of rows in the array
columnCount
Number of columns in the array
formula
If true, return formulas. Otherwise, return values.

Glossary Item Box

Gets an object array from a specified range of cells.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer, _
   ByVal formula As Boolean _
) As Object(,)
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim formula As Boolean
Dim value() As Object
 
value = instance.GetArray(row, column, rowCount, columnCount, formula)
C# 
public object[,] GetArray( 
   int row,
   int column,
   int rowCount,
   int columnCount,
   bool formula
)

Parameters

row
Row index of the cell from which to read into the array
column
Column index of the cell from which to read into the array
rowCount
Number of rows in the array
columnCount
Number of columns in the array
formula
If true, return formulas. Otherwise, return values.

Example

This example uses the Formula parameter.
C#Copy Code
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
object[,] arr;
arr = dm.GetArray(0, 0, 2, 2, true);
ListBox1.Items.Add(Convert.ToString(arr.GetLowerBound(1)));
Visual BasicCopy Code
Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel = CType(FpSpread1.ActiveSheetView.DataModel, FarPoint.Web.Spread.Model.DefaultSheetDataModel)
Dim arr(,) As Object
arr = dm.GetArray(0, 0, 2, 2, True)
ListBox1.Items.Add(Convert.ToString(arr.GetLowerBound(1)))

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.