Spread Silverlight Documentation
GetArray(Int32,Int32,Int32,Int32) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > GetArray Method : GetArray(Int32,Int32,Int32,Int32) Method
Row index of the cell from which to read into the array
Column index of the cell from which to read into the array
Number of rows in the array
Number of columns in the array
Gets an object array from a specified range of cells.
Syntax
'Declaration
 
Public Overloads Function GetArray( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal rowCount As System.Integer, _
   ByVal columnCount As System.Integer _
) As System.Object(,)
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim rowCount As System.Integer
Dim columnCount As System.Integer
Dim value() As System.Object
 
value = instance.GetArray(row, column, rowCount, columnCount)
public System.object[,] GetArray( 
   System.int row,
   System.int column,
   System.int rowCount,
   System.int columnCount
)

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
Example
This example uses the GetArray method.
object[,] arr;
gcSpreadSheet1.ActiveSheet.SetArray(1, 0, new String[,] { { "One", "Two" } });
gcSpreadSheet1.ActiveSheet.SetArray(2, 1, new String[,] { { "Three", "Four" } }, false);
arr = gcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2);
gcSpreadSheet1.ActiveSheet.Cells[3, 3].Text = "The value of the first element in the array is " + arr.GetValue(0, 0).ToString();
Dim arr(,) As Object
GcSpreadSheet1.ActiveSheet.SetArray(1, 0, New String(,) {{"One", "Two"}})
GcSpreadSheet1.ActiveSheet.SetArray(2, 1, New String(,) {{"Three", "Four"}}, False)
arr = GcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2)
GcSpreadSheet1.ActiveSheet.Cells(3, 3).Text = "The value of the first element in the array is " & arr.GetValue(0, 0).ToString()
See Also

Reference

Worksheet Class
Worksheet Members
Overload List