In this simple topic, you’ll learn how to Remove Password Protection From XLSX File using NET REST API. We will develop an application to decrypt XLSX file using NET Cloud API by following the detailed and lucid steps mentioned in the following section. The created application can be used with any application supporting NET in macOS, Linux, or Windows environments and conversion can be done for free.
Prerequisite
- Download Aspose.Cells Cloud SDK for NET to decrypt XLSX file using NET Cloud API
- Setup NET project with the above SDK to protect an XLSX file
Steps to Reset XLSX file Password using NET low code API
- Set the Client ID and Client Secret for the API to decrypt the Workbook with a password using NET REST API
- Create an object of the CellsApi class with client credentials to reset XLSX file password using NET low code API
- Add the source XLSX file names and load the source XLSX using a name and File object in a HashMap
- Create an instance of the DeleteUnProtectWorkbookRequest to add the existing password and other properties
- Call the DeleteUnProtectWorkbook request method to decrypt excel file with password using NET REST API
- Save the decrypted XLSX file/s on the local disk
The aforementioned steps remove password protection on XLSX 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 XLSX file/s using a HashMap and create an instance of the DeleteUnProtectWorkbookRequest class that is further used for resetting the password protection for the XLSX files using the deleteUnProtectWorkbook() method.
Code to Decrypt XLSX file Password using NET REST API
This simple example code enables you to clear excel file password using NET low code API. You need to provide the source XLSX files and existing password for removing protection along with other optional properties. After formulating the Request Message, deleteUnProtectWorkbook() performs the decryption on the XLSX file and returns the password cleared XLSX files that can stored on the disk or inside the database.
We have learned to decrypt Workbook with Password using NET REST API in this topic. If you want to set the password for an XLSX file, refer to the article on how to Password Protect XLSX File with NET REST API.