GrapeCity.Xaml.SpreadSheet.Data
Remove Method (WorksheetCollection)
Example 


GrapeCity.Xaml.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 Boolean
'Usage
 
Dim instance As WorksheetCollection
Dim worksheet As Worksheet
Dim value As Boolean
 
value = instance.Remove(worksheet)
public override 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 removes a sheet.
//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