Visual Basic (Declaration) | |
---|---|
Public Overloads ReadOnly Property Item( _ ByVal row As Integer, _ ByVal column As Integer _ ) As Cell |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As Cells Dim row As Integer Dim column As Integer Dim value As Cell value = instance.Item(row, column) |
Parameters
- row
- Row number for the cell
- column
- Column number for the cell
Property Value
Cell objectException | Description |
---|---|
System.IndexOutOfRangeException | Specified row index is not valid; must be between zero and the total number of rows |
System.IndexOutOfRangeException | Specified column index is not valid; must be between zero and the total number of columns |
System.IndexOutOfRangeException | Specified column header row index is not valid; must be between zero and the total number of column header rows |
System.IndexOutOfRangeException | Specified row header column index is not valid; must be between zero and the total number of row header columns |
System.IndexOutOfRangeException | Specified sheet corner row index is not valid; must be between zero and the total number of sheet corner rows |
System.IndexOutOfRangeException | Specified sheet corner column index is not valid; must be between zero and the total number of sheet corner columns |
This example creates a Cell object and uses its formula property to sum the values of two cells.
C# | Copy Code |
---|---|
[ No support for the Item property exists in C#. ] |
Visual Basic | Copy Code |
---|---|
Dim acell, mycell, urcell As FarPoint.Web.Spread.Cell acell = FpSpread1.ActiveSheetView.Cells(0, 0) mycell = FpSpread1.ActiveSheetView.Cells.Item(2, 2) urcell = FpSpread1.ActiveSheetView.Cells.Item(2, 3) FpSpread1.ActiveSheetView.Cells(2, 3).Value = 10 FpSpread1.ActiveSheetView.Cells(2, 2).Value = 10 acell.Formula = "SUM(" + mycell.ToString(FarPoint.Web.Spread.Model.ReferenceStyle.A1) + "," + urcell.ToString(FarPoint.Web.Spread.Model.ReferenceStyle.A1) + ")" |
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6