Remove Password Protection From Excel File using NET REST API

Discover how to effortlessly remove password protection from an Excel file using the .NET REST API. In this tutorial we’ll build a .NET application that decrypts Excel workbooks with the Aspose.Cells Cloud API, guiding you through clear, step‑by‑step instructions. The resulting solution runs on any .NET‑compatible platform—macOS, Linux, or Windows—and the decryption service is available for free.

Prerequisite

Steps to Reset Excel file Password using NET low code API

  1. Set the Client ID and Client Secret for the API to decrypt the Workbook with a password using NET REST API
  2. Create an object of the CellsApi class with client credentials to reset Excel file password using NET low code API
  3. Add the source XLS file names and load the source XLS using a name and File object in a HashMap
  4. Create an instance of the DeleteUnProtectWorkbookRequest to add the existing password and other properties
  5. Call the DeleteUnProtectWorkbook request method to decrypt excel file with password using NET REST API
  6. Save the decrypted Excel file/s on the local disk

The aforementioned steps remove password protection on Excel using NET REST API. We will initiate the process with the setting up the SDK and creating the CellsAPI class instance. We will then load the source XLS file/s using a HashMap and create an instance of the DeleteUnProtectWorkbookRequest class that is further used for resetting the password protection for the Excel files using the deleteUnProtectWorkbook() method.

Code to Decrypt Excel file Password using NET REST API

This straightforward example demonstrates how to clear an Excel file’s password using the .NET low‑code API. Simply provide the source workbook and its current password—along with any optional properties you need. After constructing the request message, deleteUnProtectWorkbook() decrypts the file and returns the workbook with protection removed, ready to be saved to disk or stored in a database.

In this tutorial we demonstrated how to decrypt a password‑protected workbook using the .NET REST API. When you’re ready to add password protection to an Excel file, see our guide on Password Protect Excel File with NET REST API.

 English