Spread WPF Documentation
Remove Method (WorksheetCollection)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > WorksheetCollection Class : Remove Method
The Worksheet object to remove.
Removes the specified sheet from the collection.
Syntax
'Declaration
 
Public Overrides Function Remove( _
   ByVal worksheet As Worksheet _
) As System.Boolean
'Usage
 
Dim instance As WorksheetCollection
Dim worksheet As Worksheet
Dim value As System.Boolean
 
value = instance.Remove(worksheet)
public override System.bool Remove( 
   Worksheet worksheet
)

Parameters

worksheet
The Worksheet object to remove.

Return Value

Returns true if the sheet is removed; otherwise, false.
Example
This example uses the Remove method.
//Remove some sheets
gcSpreadSheet1.SheetCount = 5;
gcSpreadSheet1.Sheets.Remove(gcSpreadSheet1.Sheets[1]);
gcSpreadSheet1.Sheets.RemoveAt(0);
'Remove some sheets
GcSpreadSheet1.SheetCount = 5
GcSpreadSheet1.Sheets.Remove(GcSpreadSheet1.Sheets(1))
GcSpreadSheet1.Sheets.RemoveAt(0)
See Also

Reference

WorksheetCollection Class
WorksheetCollection Members