NodeJS API to decrypt local Microsoft Excel and OpenOffice Calc spreadsheet with password

NodeJS library to decrypt local Microsoft Excel and OpenOffice Calc spreadsheet with password

Use Cells Decrypt REST API to decrypt local Microsoft Excel and OpenOffice Calc spreadsheet with password workflows in NodeJS. This professional solution decrypts local Microsoft Excel and OpenOffice Calc spreadsheet online with passwords using NodeJS.

Decrypt local Microsoft Excel and OpenOffice Calc spreadsheet with password - NodeJS REST API

API Request:
POST
https://api.aspose.cloud/v3.0/cells/unlock

Decrypting a local spreadsheet with a password is a complex task. Decrypting a local spreadsheet with password transitions is performed by our NodeJS SDK while maintaining the source spreadsheet's main structural and logical content. Our NodeJS library is a professional solution to decrypt local spreadsheets with a password online. This Cloud SDK gives NodeJS developers powerful functionality and perfect API.

NodeJs code for decrypting local spreadsheets

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-node/
const { LightCellsApi, PostUnlockRequest } = require("asposecellscloud");
const clientId = process.env.CellsCloudClientId;
const clientSecret = process.env.CellsCloudClientSecret;
const ApiURL = process.env.CellsCloudApiBaseUrl;
const fs = require('fs');
const path = require('path');
const cellsApi = new LightCellsApi(clientId, clientSecret,"v3.0",ApiURL);
const localPath = "D:/aspose-cells-cloud-node/TestData/"
const AssemblyTestXlsx = "assemblytest.xlsx";
const DataSourceXlsx = "datasource.xlsx";
const dataAssemblyTestXlsx = fs.createReadStream(path.join(localPath, AssemblyTestXlsx));
const dataDataSourceXlsx = fs.createReadStream(path.join(localPath, DataSourceXlsx));
const req = new PostUnlockRequest ({
file: { AssemblyTestXlsx: dataAssemblyTestXlsx, DataSourceXlsx: dataDataSourceXlsx },
password : "123456"
});
cellsApi.postUnlock(req)
.then((result) => {
console.log("successfully")
let buff = new Buffer.from(result.body.files[0].fileContent, 'base64');
fs.writeFileSync(result.body.files[0].filename, buff);
})
.catch((error) => {
console.error('Unhandled Promise Rejection:', error);
});


How to use Node API to decrypt


  1. Create an account at Dashboard to get free API quota & authorization details
  2. Initialize CellsApi with Client Id, Client Secret, Base URL & API version
  3. Call postUnlock method to get the resultant stream


System Requirements


  1. node v6.17.1 or newer