Gets or sets the number of sheets in a collection.
Syntax
Visual Basic (Declaration) | |
---|
Public Shadows Property Count As Integer |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As SheetViewCollection
Dim value As Integer
instance.Count = value
value = instance.Count |
C# | |
---|
public new int Count {get; set;} |
Property Value
Integer number of sheets in the collection
Remarks
Example
This example creates two sheets and adds them to the collection of the sheet so that the total number of sheets now equals three (which includes the one that is added by default and the two added to the collection). This is verified by returning the number of sheets in the collection to a list box.
C# | Copy Code |
---|
System.Collections.ArrayList coll=new System.Collections.ArrayList(2);
FarPoint.Web.Spread.SheetView sv=new FarPoint.Web.Spread.SheetView();
FarPoint.Web.Spread.SheetView sv1=new FarPoint.Web.Spread.SheetView();
sv.GridLineColor=Color.Red;
sv.GridLines=GridLines.Vertical;
sv1.GridLineColor=Color.Yellow;
sv1.GridLines=GridLines.Horizontal;
coll.Add(sv);
coll.Add(sv1);
FpSpread1.Sheets.AddRange(coll);
ListBox1.Items.Add(Convert.ToString(FpSpread1.Sheets.Count)); |
Visual Basic | Copy Code |
---|
Dim coll As New System.Collections.ArrayList(2)
Dim sv As New FarPoint.Web.Spread.SheetView()
Dim sv1 As New FarPoint.Web.Spread.SheetView()
sv.GridLineColor=Color.Red
sv.GridLines=GridLines.Vertical
sv1.GridLineColor=Color.Yellow
sv1.GridLines=GridLines.Horizontal
coll.Add(sv)
coll.Add(sv1)
FpSpread1.Sheets.AddRange(coll)
ListBox1.Items.Add(FpSpread1.Sheets.Count) |
Requirements
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
See Also