Spread Silverlight Documentation
RemoveAt Method (WorksheetCollection)
Example 


The zero-based index of the sheet to remove.
Removes the sheet at the specified index.
Syntax
'Declaration
 
Public Overrides Sub RemoveAt( _
   ByVal index As System.Integer _
) 
'Usage
 
Dim instance As WorksheetCollection
Dim index As System.Integer
 
instance.RemoveAt(index)
public override void RemoveAt( 
   System.int index
)

Parameters

index
The zero-based index of the sheet to remove.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionindex is not a valid index in the collection.
System.NotSupportedExceptionThe collection is read-only.
Example
This example uses the RemoveAt 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)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

WorksheetCollection Class
WorksheetCollection Members

 

 


Copyright © GrapeCity, inc. All rights reserved.