Sets an object array into a specified range of cells
Overload List
Remarks
Example
This example creates a new DefaultSheetDataModel and attaches it to the DataModel of the active sheet. Data is added via the SetArray method.
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(Me.IsPostBack)ThenReturn
DimdmAsNewFarPoint.Web.Spread.Model.DefaultSheetDataModel(8,8)
FpSpread1.ActiveSheetView.DataModel=dm
Dimarr(4,9)AsObject
DimoAsObject
Dimi,jAsInteger
Fori=0To4
Forj=0To9
arr(i,j)=i+j
Nextj
Nexti
dm.SetArray(1,0,arr)
EndSub |
C# | Copy Code |
---|
privatevoidPage_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;
FarPoint.Web.Spread.Model.DefaultSheetDataModeldm=newFarPoint.Web.Spread.Model.DefaultSheetDataModel(10,10);
FpSpread1.ActiveSheetView.DataModel=dm;
inti,j;
object[,]arr;
arr=newobject[4,9];
for(i=0;i<4;i++)
{
for(j=0;j<9;j++)
arr[i,j]=i+j;
}
dm.SetArray(1,0,arr);
} |
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