Remove Worksheets
Contents
[
Hide
]
This topic provides information about how to remove worksheets from Microsoft Excel files using the Aspose.Cells.GridWeb API.It is possible to either remove a worksheet by specifying its sheet index or name.
Removing a Worksheet
Using Sheet Index
The code below shows how to remove a worksheet by specifying its sheet index in the GridWorksheetCollection’s RemoveAt method.
Using Sheet Name
The code below shows how to remove a worksheet by specifying its sheet name in the GridWorksheetCollection’s RemoveAt method.
It is also possible to remove a worksheet using its reference or instance. To do so, use the GridWorksheetCollection’s Remove method. This approach is commonly used.