C# API to protect local Microsoft Excel and OpenOffice Calc spreadsheet with password

C# library to protect local Microsoft Excel and OpenOffice Calc spreadsheet with password

Use Cells Protect REST API to protect local Microsoft Excel and OpenOffice Calc spreadsheet with password workflows in C#. This professional solution protects Microsoft Excel and OpenOffice Calc spreadsheet online with passwords using C#.

Protect local Microsoft Excel and OpenOffice Calc spreadsheet with password - C# REST API

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

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

Code example in C# using REST API to encryption local spreadsheets

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/
namespace Aspose.Cells.Cloud.SDK.Example
{
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Request;
using System;
using System.Collections.Generic;
using System.IO;
public partial class CellsApiExample
{
public void PostExportExample()
{
CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("CellsCloudTestClientId"), Environment.GetEnvironmentVariable("CellsCloudTestClientSecret"));
IDictionary<string, Stream> mapFiles = new Dictionary<string, Stream>();
mapFiles.Add("assemblytest.xlsx", File.OpenRead(@".\TestData\assemblytest.xlsx"));
mapFiles.Add("datasource.xlsx", File.OpenRead(@".\TestData\datasource.xlsx"));
PostExportRequest request = new PostExportRequest { File = mapFiles, format ="pdf", objectType ="chart"};
cellsApi.PostExport(request);
}
}
}


How to use C# API to encrypt


  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 PostProtect method to get the resultant stream


System Requirements


  1. NET Framework 4.5.2 or newer
  2. Net Standard 2.0 or newer