Aspose.Cells  for .NET

Unlock ODS Spreadsheet via C#

Remove protection from ODS using .NET library.

How to Unlock ODS File Using C#

In order to remove protection ODS file, we’ll use

Aspose.Cells for .NET

API which is a feature-rich, powerful and easy to use document protection API for C# platform. Open


package manager, search for Aspose.Cells and install. You may also use the following command from the Package Manager Console.


PM> Install-Package Aspose.Cells

Unlock ODS via C#

You need


referenced in your project to execute the following workflow.

  1. Instantiate Workbook class with path to protected ODS file
  2. Get the default or any Worksheet to remove protection
  3. Remove Worksheet protection with Worksheet.Unprotect method
  4. Remove Workbook protection with Workbook.Unprotect method
  5. Save result in ODS format

System Requirements

Aspose.Cells for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Add reference to the Aspose.Cells for .NET DLL in your project


// instantiate a Workbook object with protected ODS file
var workbook = new Aspose.Cells.Workbook("protected.ods");

// access the default worksheet in the Excel file
var worksheet = workbook.Worksheets[0];

// unprotect worksheet without a password

// unprotect workbook with password

// save the result back in ODS format
workbook.Save("unprotected.ods", Aspose.Cells.SaveFormat.Auto);
  • About Aspose.Cells for .NET API

    Aspose.Cells API can be used to create, edit, convert and render Microsoft Excel formats to different formats. Moreover, it can be used for comprehensive charting, scalable reporting and reliable calculations within software applications. Aspose.Cells is a standalone API and it does not require any software like Microsoft or OpenOffice.

    Free App to Unlock ODS

    Other Supported Unlocking Formats

    Using C#, one can easily remove protection / unlocking of different formats including.

    XLS (Excel Binary Format)
    XLSB (Binary Excel Workbook File)
    XLSM (Spreadsheet File)
    XLSX (OOXML Excel File)