# CellSummaryApi

Canonical page: https://www.adaptabletools.com/docs/reference/cellsummaryapi

The summary calculated for the selected cells, such as sum or average, and the value it produces.

```ts title="TypeScript"
export interface CellSummaryApi 
```

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [getCellSummaryOperationValue(operation)](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#getcellsummaryoperationvalue) | `any` | The result of a summary operation for the current selection. |
| [getCurrentCellSummaryOperation()](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#getcurrentcellsummaryoperation) | [`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)` \| string` | Retrieves currently selected Cell Summary Operation |
| [getCurrentCellSummaryOperationValue()](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#getcurrentcellsummaryoperationvalue) | `number` | Retrieves the value of the current selected Cell Summary Operation |
| [getCustomCellSummaryOperations()](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#getcustomcellsummaryoperations) | [`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)`[]` | Retrieves all Custom Cell Summary Operations |
| [openCellSummaryPopupSettingsPanel()](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#opencellsummarypopupsettingspanel) | `void` | Opens Cell Summary Settings Panel with |
| [setCurrentCellSummaryOperation(operation)](https://www.adaptabletools.com/docs/reference/cellsummaryapi.md#setcurrentcellsummaryoperation) | `void` | Selects which summary to show for the current cell selection. |

## Method Details

### getCellSummaryOperationValue

The result of a summary operation for the current selection.

```ts title="TypeScript"
getCellSummaryOperationValue(operation: CustomCellSummaryOperation | string): any;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| operation | [`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)` \| string` | Operation to evaluate |

###### Returns

 The result of a summary operation for the current selection

`any`

### getCurrentCellSummaryOperation

Retrieves currently selected Cell Summary Operation

```ts title="TypeScript"
getCurrentCellSummaryOperation(): CustomCellSummaryOperation | string;
```

###### Returns

 Currently selected Cell Summary Operation

[`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)` | string`

### getCurrentCellSummaryOperationValue

Retrieves the value of the current selected Cell Summary Operation

```ts title="TypeScript"
getCurrentCellSummaryOperationValue(): number;
```

###### Returns

 The value of the current selected Cell Summary Operation

`number`

### getCustomCellSummaryOperations

Retrieves all Custom Cell Summary Operations

```ts title="TypeScript"
getCustomCellSummaryOperations(): CustomCellSummaryOperation[];
```

###### Returns

 All Custom Cell Summary Operations

[`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)`[]`

### openCellSummaryPopupSettingsPanel

Opens Cell Summary Settings Panel with

```ts title="TypeScript"
openCellSummaryPopupSettingsPanel(): void;
```

###### Returns

`void`

### setCurrentCellSummaryOperation

Selects which summary to show for the current cell selection.

```ts title="TypeScript"
setCurrentCellSummaryOperation(operation: CustomCellSummaryOperation | string): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| operation | [`CustomCellSummaryOperation`](https://www.adaptabletools.com/docs/reference/customcellsummaryoperation.md)` \| string` | Operation name, or a custom operation |

###### Returns

`void`
