---
title: "GridWorksheet.SetProtect"
url: "https://reference.aspose.com/cells/net/aspose.cells.gridweb.data/gridworksheet/setprotect/"
product: "Aspose.Cells for .NET API Reference"
description: "GridWorksheet method. Protects worksheet"
---

## GridWorksheet.SetProtect method

Protects worksheet.

```csharp
public void SetProtect()
```

### Remarks

This method protects worksheet without password. It can protect worksheet in all versions of Excel file.

### See Also

* class [GridWorksheet](../)
* namespace [Aspose.Cells.GridWeb.Data](../../../aspose.cells.gridweb.data/)
* assembly [Aspose.Cells.GridWeb](../../../)


