Remove a Worksheet
Contents
[
Hide
]
This topic discusses removing worksheets using the Aspose.Cells.GridDesktop control. There are a few simple approaches to accomplish this basic task.
Removing a Worksheet
To remove a worksheet using Aspose.Cells.GridDesktop control, please follow the steps below:
- Add the Aspose.Cells.GridDesktop control to a form.
- Call the Worksheets collection’s Remove method in the GridDesktop control.
Using Worksheet Index
In this approach, simply pass the worksheet index (in the worksheets collection of the grid) of the worksheet to be removed.
Using Worksheet Name
If the name of the worksheet is known, it is possible to remove a specific worksheet by specifying its name.
Remove is a method. Use it to remove a worksheet using its index (in the worksheets collection) or use RemoveAt method to remove the worksheet using its index/name.