Workbook.Unprotect
Workbook.Unprotect method
Unprotects a workbook.
public void Unprotect(string password)
| Parameter | Type | Description |
|---|---|---|
| password | String | Password to unprotect the workbook. |
Examples
using System;
using Aspose.Cells;
namespace AsposeCellsExamples
{
public class WorkbookMethodUnprotectWithStringDemo
{
public static void Run()
{
// Create a workbook with protection
Workbook workbook = new Workbook();
workbook.Protect(ProtectionType.All, "book");
// Unprotect the workbook with correct password
workbook.Unprotect("book");
// Save the unprotected workbook
workbook.Save("unprotected_workbook.xlsx");
}
}
}
See Also
- class Workbook
- namespace Aspose.Cells
- assembly Aspose.Cells