|
| 1 | + |
| 2 | +# **Spreadsheet Cloud API: aggregateCellsByColor** |
| 3 | + |
| 4 | +The Aggregate by Color API provides a convenient way to perform calculations on cells that share the same fill or font color. This API supports a range of aggregate operations, including count, sum, maximum value, minimum value, and average value, enabling you to analyze and summarize data based on color distinctions. |
| 5 | + |
| 6 | + |
| 7 | +## **Quick Start** |
| 8 | + |
| 9 | +- **Base URL**: `http://api.aspose.cloud/v4.0` |
| 10 | +- **Authentication Method**: `JWT (OAuth2, application)` **Token URL**: `https://api.aspose.cloud/connect/token` |
| 11 | +- **Example** |
| 12 | + |
| 13 | +## **Interface Details** |
| 14 | + |
| 15 | +### **Endpoint** |
| 16 | + |
| 17 | +``` |
| 18 | +PUT http://api.aspose.cloud/v4.0/cells/calculate/aggergate/color |
| 19 | +``` |
| 20 | +### **Function Description** |
| 21 | +The Aggregate by Color API is a powerful tool for data analysis, allowing you to perform color-based aggregations efficiently. Whether you need to count, sum, find the max or min value, or calculate the average, this API provides the flexibility to handle various aggregate operations based on cell colors.- Color-Based Aggregation: Perform calculations on cells grouped by their fill or font color.- Aggregate Operations:- Count: Determine the number of cells with the same color.- Sum: Calculate the total value of cells with the same color.- Max Value: Identify the highest value among cells with the same color.- Min Value: Find the lowest value among cells with the same color.- Average Value: Compute the mean value of cells with the same color.**Example Use Case**Suppose you have a spreadsheet where different categories of data are highlighted with different colors. You can use the Aggregate by Color API to quickly summarize the data for each color category. For instance, you can calculate the total sales for cells highlighted in green or the average cost for cells highlighted in red. |
| 22 | + |
| 23 | +### The request parameters of **aggregateCellsByColor** API are: |
| 24 | + |
| 25 | +| Parameter Name | Type | Path/Query String/HTTPBody | Description | |
| 26 | +| :- | :- | :- |:- | |
| 27 | +|Spreadsheet|File|FormData|Upload spreadsheet file.| |
| 28 | +|worksheet|String|Query|| |
| 29 | +|range|String|Query|| |
| 30 | +|operation|String|Query|| |
| 31 | +|colorPosition|String|Query|| |
| 32 | +|regoin|String|Query|The spreadsheet region setting.| |
| 33 | +|password|String|Query|The password for opening spreadsheet file.| |
| 34 | + |
| 35 | +### **Response Description** |
| 36 | +```json |
| 37 | +{ |
| 38 | + "Name": "AggregateResultByColorResponse", |
| 39 | + "Type": "Class", |
| 40 | + "ParentName": "CellsCloudResponse", |
| 41 | + "IsAbstract": false, |
| 42 | + "Properties": [ |
| 43 | + { |
| 44 | + "Name": "AggregateResults", |
| 45 | + "Nullable": true, |
| 46 | + "ReadOnly": false, |
| 47 | + "IsInherit": false, |
| 48 | + "DataType": { |
| 49 | + "Identifier": "Container", |
| 50 | + "Reference": "AggregateResultByColor", |
| 51 | + "ElementDataType": { |
| 52 | + "Identifier": "Class", |
| 53 | + "Reference": "AggregateResultByColor", |
| 54 | + "Name": "class:aggregateresultbycolor" |
| 55 | + }, |
| 56 | + "Name": "container" |
| 57 | + } |
| 58 | + }, |
| 59 | + { |
| 60 | + "Name": "Code", |
| 61 | + "Nullable": true, |
| 62 | + "ReadOnly": false, |
| 63 | + "IsInherit": true, |
| 64 | + "DataType": { |
| 65 | + "Identifier": "Integer", |
| 66 | + "Name": "integer" |
| 67 | + } |
| 68 | + }, |
| 69 | + { |
| 70 | + "Name": "Status", |
| 71 | + "Nullable": true, |
| 72 | + "ReadOnly": false, |
| 73 | + "IsInherit": true, |
| 74 | + "DataType": { |
| 75 | + "Identifier": "String", |
| 76 | + "Name": "string" |
| 77 | + } |
| 78 | + } |
| 79 | + ] |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | + |
| 84 | +## OpenAPI Specification |
| 85 | + |
| 86 | +The [OpenAPI Specification](https://reference.aspose.cloud/cells/#/CalculateController/AggregateCellsByColor) defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser. |
0 commit comments