Skip to main content
.NET Framework 4.5.2+

How to: Delete a Worksheet


You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these examples in production code.

This example demonstrates how to remove a worksheet from a workbook by calling the WorksheetCollection.Remove or WorksheetCollection.RemoveAt method of the WorksheetCollection object that is accessed via the Workbook.Worksheets property.

View Example

// Delete the "Sheet2" worksheet from the workbook.

// Delete the first worksheet from the workbook.

You can also hide a worksheet. See the How to: Show and Hide a Worksheet topic for details.


A workbook must always contain at least one visible worksheet.

See Also