Swift API to add watermark for local Microsoft Excel and OpenOffice Calc spreadsheet
Swift library to add watermark for local Microsoft Excel and OpenOffice Calc spreadsheet
Add watermark for local Microsoft Excel and OpenOffice Calc spreadsheet - Swift REST API
API Request:
POST
https://api.aspose.cloud/v3.0/cells/watermark
Adding watermark for a local spreadsheet is a complex task. Adding watermark for a local spreadsheet transitions is performed by our Swift SDK while maintaining the source spreadsheet's main structural and logical content. Our Swift library is a professional solution to adding watermark for local spreadsheets online. This Cloud SDK gives Swift developers powerful functionality and perfect API.
Code example in Swift using REST API to add watermark for local spreadsheets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let expectation1 = self.expectation(description: "checkAuth") | |
AsposeCellsCloudAPI.clientId = "xxx-xxx-xxx-xxx-xxxxx" | |
AsposeCellsCloudAPI.clientSecret = "xxxxxx" | |
AuthAspose.checkAuth() | |
{ | |
(authError) in | |
guard authError == nil else { | |
XCTFail("error checkAuth") | |
return | |
} | |
expectation1.fulfill() | |
} | |
self.waitForExpectations(timeout: testTimeout, handler: nil) | |
let expectation = self.expectation(description: "testpostWatermark") | |
var files = Dictionary<String, URL>() | |
files[BOOK1] = getURL(BOOK1) | |
files[MYDOC] = getURL(MYDOC) | |
let text:String = "aspose.cells cloud sdk" | |
let color:String = "#333" | |
LiteCellsAPI.postWatermark(files: files, text: text, color: color) | |
{ | |
(response, error) in | |
guard error == nil else { | |
XCTFail("error testpostWatermark") | |
return | |
} | |
if let response = response { | |
XCTAssertTrue(response is FilesResult) | |
expectation.fulfill() | |
} | |
} | |
self.waitForExpectations(timeout: testTimeout, handler: nil) |
How to use Swift API to add watermark
- Create an account at Dashboard to get free API quota & authorization details
- Initialize CellsApi with Client Id, Client Secret, Base URL & API version
- Call PostWatermark method to get the resultant stream
System Requirements
- macOS Monterey 12.4
- Swift 4.2