Protect and Unprotect Worksheet with Golang via C++
Contents
[
Hide
]
To prevent other users from accidentally or deliberately changing, moving, or deleting data in a worksheet, you can lock the cells on your Excel worksheet and then protect the sheet with a password.
Protect and Unprotect Worksheets in MS Excel

- Click Review > Protect Worksheet.
- Enter a password in the Password box.
- Select the allow options.
- Select OK, re-enter the password to confirm it, and then select OK again.
Protect Worksheet Using Aspose.Cells for Go via C++
You only need the following simple lines of code to implement protecting the workbook structure of Excel files.
Unprotect Worksheet Using Aspose.Cells for Go via C++
Unprotecting a worksheet is easy with the Aspose.Cells API. If the worksheet is password‑protected, a correct password is required.