Add, Minus, Multiply, Divide and Percentage in Spreadsheet/Excel
Contents
[
Hide
]
Developers can use this API to perform addition, subtraction, multiplication, division, and percentage calculations on specified ranges of spreadsheets/Excel.
Calculate Operation | Description |
---|---|
Add | + |
Minus | - |
Multiply | * |
Divide | / |
Percentage | % |
Math Calculate API
PUT http://api.aspose.cloud/v4.0/cells/calculate/math
Request Parameters:
Parameter Name | Type | Path/Query String/HTTP Body | Description |
---|---|---|---|
Spreadsheet | File | FormData | Upload the spreadsheet file for processing. |
operation | String | Query | The mathematical operation to perform (Add, Minus, Multiply, Divide, and Percentage). |
value | String | Query | A value to use in the calculation, if applicable. |
worksheet | String | Query | The name of the worksheet to operate on. |
range | String | Query | The range of cells to include in the calculation. |
region | String | Query | Defines the specific region of the spreadsheet. |
password | String | Query | The password for opening the spreadsheet file, if protected. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream",
"Name": "file"
}
}
]
Error Codes
- 400 Bad Request: Invalid Apose.Cells Cloud API URI.
- 401 Unauthorized: Invalid access token. Or invalid client id and secret.
- 404 Not Found: The spreadsheet file not accessible.
- 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.
Where should we use the Math Calculate API?
The math calculation API is suitable for batch calculations on spreadsheets.
Why should you use the Math Calculate API?
- Perform batch math calculations.
- Development can be quickly completed through the existing SDK.
How to Use the Math Calculate API with SDKs
Math Calculate API Specification
The Math Calculate Specification defines a publicly accessible programming interface, allowing developers to interact with the API directly from a web browser.
Use Aspose.Cells Cloud SDKs
Using the SDK is the fastest way to develop, as it abstracts away the low-level details, allowing you to math calculations by cell with just a short code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: