Spread Windows Forms 11.0 Product Documentation
SetArray Method (DefaultSheetDataModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetDataModel Class : SetArray Method
Sets an object array into a specified range of cells.
Overload List
OverloadDescription
Sets an object array into a specified range of cells.  
Sets an object array into a specified range of cells.  
Sets an object array into a specified range of cells.  
Example
This example sets an object array into a range of cells.
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 10)
FpSpread1.ActiveSheet.Models.Data = dataModel
Dim arr(5, 10) As Object
Dim o As Object
Dim i, j As Integer
For i = 0 To 4
For j = 0 To 9
arr(i, j) = i + j
Next j
Next i
dataModel.SetArray(1, 0, arr)
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 10);
fpSpread1.ActiveSheet.Models.Data = dataModel;
int i, j;
object[,] arr;
arr = new object[5,10];
for(i = 0; i <= 4; i++)
{
for(j = 0; j <= 9; j++)
arr[i,j] = i + j;
}
dataModel.SetArray(1, 0, arr);
}
See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members