Spread WPF Documentation
Add Method (WorksheetCollection)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > WorksheetCollection Class : Add Method
The Worksheet object to add.
Adds the specified sheet to the collection.
Syntax
'Declaration
 
Public Overrides Sub Add( _
   ByVal worksheet As Worksheet _
) 
'Usage
 
Dim instance As WorksheetCollection
Dim worksheet As Worksheet
 
instance.Add(worksheet)
public override void Add( 
   Worksheet worksheet
)

Parameters

worksheet
The Worksheet object to add.
Example
This example uses the Add method.
//Add some sheets
gcSpreadSheet1.Sheets.Add(new Worksheet());
gcSpreadSheet1.Sheets.Add(new Worksheet("customSheet"));
gcSpreadSheet1.Sheets.Add(new Worksheet(new StyleInfoCollection()));
gcSpreadSheet1.Sheets.Add(new Worksheet(10, 10));
gcSpreadSheet1.Sheets.Add(new Worksheet(10, 10, 2, 2));
'Add some sheets
GcSpreadSheet1.Sheets.Add(New Worksheet())
GcSpreadSheet1.Sheets.Add(New Worksheet("customSheet"))
GcSpreadSheet1.Sheets.Add(New Worksheet(New StyleInfoCollection()))
GcSpreadSheet1.Sheets.Add(New Worksheet(10, 10))
GcSpreadSheet1.Sheets.Add(New Worksheet(10, 10, 2, 2))
See Also

Reference

WorksheetCollection Class
WorksheetCollection Members