Aspose.Cells  for C++

Unlock ODS Files via C++

Remove protection from Excel spreadsheets including ODS file using C++ Library.

How to Remove Protection of ODS File Using C++

In order to unlock ODS file, we’ll use

Aspose.Cells for C++

API which is a feature-rich, powerful and easy to use document protection API for C++ platform. You can download its latest version directly, just open


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


PM> Install-Package Aspose.Cells.Cpp

Unlock ODS via C++

You need


referenced in your project to execute the following workflow.

  1. Load ODS locked file using CreateIWorkbook.
  2. Call Unprotect() function to unlock.
  3. Set password to NULL using SetPassword.
  4. Save ODS file at a specified location.

System Requirements

Aspose.Cells for C++ supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with C++ Runtime Environment for Windows 32 bit, Windows 64 bit and Linux 64 bit.
  • Add reference to the Aspose.Cells for C++ DLL in your project.


// Source directory path.
StringPtr srcDir = new String("SourceDirectory\\");

// Output directory path.
StringPtr outDir = new String("OutputDirectory\\");

// Load ODS file
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook(srcDir->StringAppend(new String("sampleExcelFileProtected.ods")));

// Unprotect workbook
workbook->Unprotect(new String("12345"));

// Set password to null

// Save the ODS file
workbook->Save(outDir->StringAppend(new String("sampleExcelFileUnprotected_out.ods")));
  • About Aspose.Cells for C++ 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)