# FSheetSlicer

> Language fallback: requested `zh-CN`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/zh-CN/reference/facade/sheet-slicer](https://docs.univer.ai/zh-CN/reference/facade/sheet-slicer)

- Agent Markdown: [https://docs.univer.ai/zh-CN/reference/facade/sheet-slicer.md](https://docs.univer.ai/zh-CN/reference/facade/sheet-slicer.md)

- Requested language: `zh-CN`

- Content language: `en-US`

- Documentation version: `1.3.0`

- Source: [facade/sheet-slicer.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/facade/sheet-slicer.mdx)

---

A live Slicer hosted by a Worksheet Drawing. Source/cache filtering is shared; presentation is per view.
All public visual dimensions are CSS pixels. Missing resource placeholders retain Drawing capabilities.
Business setters resolve false on ordinary validation/permission refusal. Exceptional inverse-recovery
listener failures reject and may require reconciliation of the coherent committed forward state.



## Access

Access through:

- [`FWorkbook.getSlicerById()`](https://docs.univer.ai/zh-CN/reference/facade/workbook.md#getslicerbyid)
- [`FWorksheet.insertSlicer()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#insertslicer)
- [`FWorksheet.getSlicer()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#getslicer)
- [`FWorksheet.getSlicers()`](https://docs.univer.ai/zh-CN/reference/facade/worksheet.md#getslicers)

## Setup

Register [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) or a preset that includes it. In plugin mode, import `@univerjs-pro/sheets-slicer/facade`. Additional methods below require their listed plugin packages. See [Facade setup](https://docs.univer.ai/zh-CN/guides/sheets/getting-started/facade.md).

## `@univerjs-pro/sheets-slicer`

### `FSheetSlicer.bringForward`

Moves only this Drawing forward one position in the official Worksheet Drawing order; source/cache/filter are unchanged.

```typescript
bringForward(): this
```

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.bringForward()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.bringToFront`

Moves only this Drawing to the front of the official Worksheet Drawing order; source/cache/filter are unchanged.

```typescript
bringToFront(): this
```

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.bringToFront()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.clearFilter`

Clears the source field filter shared by all views/connected reports of this cache, without deleting the view.
For Table sources, clears only the source column native filter; other columns are unchanged.

```typescript
clearFilter(): Promise<boolean>
```

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.clearFilter()
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.clearStyle`

Clears only this view style override with an own undefined value, restoring the document default.
Shared cache/source/filter are unchanged.

```typescript
clearStyle(): Promise<boolean>
```

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.clearStyle()
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getCache`

Returns a defensive shared cache definition in its persisted domain representation, not public px settings.

```typescript
getCache(): DeepReadonly<SlicerCacheDefinition> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const cache = control.getCache()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`SlicerCacheDefinition`](https://unpkg.com/@univerjs-pro/slicer/lib/types/definition.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getCacheId`

Returns the current shared cache ID, or undefined when the view/cache resource is missing.

```typescript
getCacheId(): string | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const cacheId = control.getCacheId()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getCacheOptions`

Returns defensive options shared by every view of this Slicer cache, or undefined when unavailable.

```typescript
getCacheOptions(): DeepReadonly<SheetSlicerCacheOptions> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const options = control.getCacheOptions()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`SheetSlicerCacheOptions`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getConnectionCandidates`

Queries compatible same-Workbook Pivot report targets for this shared source/cache.
Table sources return []; missing source/cache rejects. Linked charts normalize to their owner PivotTable.

```typescript
getConnectionCandidates(): Promise<ISlicerConnectionCandidate[]>
```

**Returns**

Compatible same-Workbook report targets, or [] for a Table source.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
const candidates = await control.getConnectionCandidates()
```

**Types:** [`ISlicerConnectionCandidate`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts) · [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getConnections`

Returns a defensive shared Pivot report connection snapshot; Table sources return undefined.

```typescript
getConnections(): DeepReadonly<ISheetSlicerConnections> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const connections = control.getConnections()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`ISheetSlicerConnections`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getDrawing`

Returns a defensive hosted Drawing snapshot, even for a resource-free placeholder.

```typescript
getDrawing(): DeepReadonly<ISheetSlicerDrawing> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const drawing = control.getDrawing()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`ISheetSlicerDrawing`](https://unpkg.com/@univerjs/sheets-drawing/lib/types/services/sheet-drawing.service.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getDrawingId`

Returns the official Drawing ID for existing grouping and Drawing APIs.

```typescript
getDrawingId(): string
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const drawingId = control.getDrawingId()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getId`

Returns the stable business view ID, not the Drawing ID.

```typescript
getId(): string
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const viewId = control.getId()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getInfo`

Returns detached source, per-view settings and placement in CSS px; it contains no items or filter selection.

```typescript
getInfo(): DeepReadonly<ISheetSlicerInfo>
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
const info = control.getInfo()
```

**Types:** [`ISheetSlicerInfo`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts) · [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getItems`

Queries a bounded defensive window of raw typed members with hasData and the real total, not all members.
Defaults to start 0/count 100, capped by business maxMemberWindowSize (default 200). start/count must be finite integers,
start &gt;= 0 and count &gt; 0. AbortSignal, source invalidation, missing source and unit/plugin disposal reject instead of
fabricating empty results. Reads do not set selection/startItem; UI/callers format labels.

```typescript
getItems(request?: ISheetSlicerItemsRequest): Promise<ISlicerSourceMemberWindow>
```

**Parameters**

- `request` — Optional. Finite integer window start/count and optional cancellation signal.

**Returns**

A bounded defensive member window with hasData and the real total.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
const window = await control.getItems({ start: 0, count: 100 })
```

**Types:** [`ISlicerSourceMemberWindow`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts) · [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`ISheetSlicerItemsRequest`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getSelection`

Returns the current shared field selection, or undefined when the hosted view/cache is missing.
Table selection reads the native source and returns undefined when that source is unavailable;
retained Pivot cache selection remains readable after source loss.
Table condition/color/manual native filters return restricted mode markers, not their full configuration or guessed includes.
Typed Blank is distinct from the literal "(blanks)"; deleted source values remain filter conditions.

```typescript
getSelection(): DeepReadonly<TableSlicerSelection> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const selection = control.getSelection()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`TableSlicerSelection`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getSettings`

Returns defensive per-view settings in CSS px, or undefined when the hosted view is missing.
Row heights are read as persisted EMU / 9525 and may reflect integer EMU rounding.

```typescript
getSettings(): DeepReadonly<SheetSlicerSettings> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const settings = control.getSettings()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`SheetSlicerSettings`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getSource`

Returns a defensive current source snapshot; source identities cannot be replaced on a live control.

```typescript
getSource(): DeepReadonly<SheetSlicerSourceSpec> | undefined
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Examples**

```ts
const source = control.getSource()
```

**Types:** [`DeepReadonly`](https://unpkg.com/@univerjs/core/lib/types/shared/types.d.ts) · [`SheetSlicerSourceSpec`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.getSourceMetadata`

Queries current source metadata without changing filtering or presentation.
Missing/unavailable sources and late results after identity/disposal changes reject; this is not a rendered-state query.

```typescript
getSourceMetadata(): Promise<ISlicerSourceMetadata>
```

**Returns**

Current source metadata, not rendered state.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
const metadata = await control.getSourceMetadata()
```

**Types:** [`ISlicerSourceMetadata`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts) · [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.remove`

Requests official Sheet Drawing deletion and linked view removal, retaining shared cache and filter conditions.
A valid hosted placeholder can be removed even when its view/cache/source is missing.
The boolean reports command acceptance, NOT a no-change or rollback guarantee: a Drawing-stage listener refusal
can return false after view deletion while the Drawing survives; a later failure can retain Drawing deletion too.
Callers can re-read/reconcile committed state. Events describe final hosted state, not the boolean result.
Acceptance does not mean remote persistence or rendering.

```typescript
remove(): Promise<boolean>
```

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected errors propagated by permission checking or the outer official command.
Mutation-sequence stage exceptions are converted to false, without a rollback guarantee.

**Examples**

```ts
const accepted = await control.remove()
// Re-read the host when a refusal requires reconciliation.
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.sendBackward`

Moves only this Drawing backward one position in the official Worksheet Drawing order; source/cache/filter are unchanged.

```typescript
sendBackward(): this
```

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.sendBackward()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.sendToBack`

Moves only this Drawing to the back of the official Worksheet Drawing order; source/cache/filter are unchanged.

```typescript
sendToBack(): this
```

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.sendToBack()
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setAbsolutePosition`

Moves only this Drawing to absolute Worksheet CSS px coordinates through the synchronous official command.
Preserves size and existing anchoring/group semantics; valid resource-free placeholders remain movable.

```typescript
setAbsolutePosition(x: number, y: number): this
```

**Parameters**

- `x` — Required. Finite absolute horizontal CSS px coordinate.
- `y` — Required. Finite absolute vertical CSS px coordinate.

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.setAbsolutePosition(100, 80)
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setCacheOptions`

Patches shared sortOrder/customListSort/crossFilter/hideItemsWithNoData at transaction execution time.
Affects every cache view; preserves locked source, selection and connections. Own undefined clears optional options.

```typescript
setCacheOptions(patch: Partial<SheetSlicerCacheOptions>): Promise<boolean>
```

**Parameters**

- `patch` — Required. Presence-aware typed patch; own undefined clears optional values.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setCacheOptions({
  sortOrder: univerAPI.Enum.SlicerCacheSortOrder.Ascending,
})
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`Partial`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`SheetSlicerCacheOptions`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setCaption`

Changes only this view caption, not its name or shared source/cache.
The caption must be nonempty and at most 32767 characters.

```typescript
setCaption(caption: string): Promise<boolean>
```

**Parameters**

- `caption` — Required. Nonempty caption, at most 32767 characters; independent of name.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setCaption('Sales')
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setColumnCount`

Sets this view button column count to an integer in [1, 20000], without changing shared filtering.

```typescript
setColumnCount(count: number): Promise<boolean>
```

**Parameters**

- `count` — Required. Integer button column count in [1, 20000].

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setColumnCount(2)
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setConnections`

Replaces, rather than appends, the shared cache report connections through the existing transaction.
Targets must share this Workbook, Pivot cache and source field; duplicates normalize to owners without silently dropping
unsupported targets. Linked charts use their owner PivotTable; owned charts use ownedPivotCharts.
The source field stays locked. Table sources and ordinary unavailable/invalid targets resolve false.

```typescript
setConnections(connections: ISheetSlicerConnections): Promise<boolean>
```

**Parameters**

- `connections` — Required. Replacement shared Pivot report reference collections.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setConnections({ pivotTables: connections.pivotTables })
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`ISheetSlicerConnections`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setLockedPosition`

Sets this view persisted position-lock flag, not a shared filter or transient gesture state.

```typescript
setLockedPosition(locked: boolean): Promise<boolean>
```

**Parameters**

- `locked` — Required. Persisted per-view position-lock flag.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setLockedPosition(true)
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setName`

Changes only this view name, not its caption or shared source/cache.
Names must be nonempty and unique across Workbook Slicers/Timelines (case-insensitive).

```typescript
setName(name: string): Promise<boolean>
```

**Parameters**

- `name` — Required. Nonempty Workbook-unique view name (case-insensitive).

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setName('Sales filter')
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setPosition`

Moves only this Drawing through the synchronous official placement command, preserving size/group semantics.
Accepts A1 or zero-based row/column anchors with CSS px offsets; a valid hosted placeholder remains movable.
Source/cache/filter are unchanged.

```typescript
setPosition(anchor: SheetSlicerAnchorSpec): this
```

**Parameters**

- `anchor` — Required. A1 cell or zero-based row/column anchor with CSS px offsets.

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.setPosition('J2')
```

**Types:** [`SheetSlicerAnchorSpec`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setRowHeight`

Sets this view item row height in finite positive CSS px, without changing shared filtering.
Persists Math.round(height * 9525) as a positive unsigned integer EMU (at most 4294967295); reads divide by 9525.

```typescript
setRowHeight(height: number): Promise<boolean>
```

**Parameters**

- `height` — Required. Finite positive CSS px height (rowHeight converts to rounded EMU).

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setRowHeight(24)
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setSelection`

Sets the typed source field selection shared by every cache view and connected report.
For Table sources, replaces this column native condition/color/manual filter; other columns are unchanged.
Typed Blank differs from the literal "(blanks)". Values outside the current window or absent/deleted from the source
remain valid conditions; do not pass labels or item indexes. All clears the field filter.

```typescript
setSelection(selection: RecordSelection): Promise<boolean>
```

**Parameters**

- `selection` — Required. Typed selection, not a localized label or window index.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setSelection({
  mode: univerAPI.Enum.FilterSelectionMode.Include,
  values: [{ type: univerAPI.Enum.RecordValueType.Blank }],
})
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`RecordSelection`](https://unpkg.com/@univerjs/core/lib/types/shared/record-value.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setShowCaption`

Sets this view caption visibility without changing its caption or shared filtering.

```typescript
setShowCaption(visible: boolean): Promise<boolean>
```

**Parameters**

- `visible` — Required. Whether this per-view element is visible.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setShowCaption(true)
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setSize`

Resizes only this Drawing in finite positive CSS px through the synchronous official placement command.
Preserves anchor/group semantics; valid resource-free placeholders remain resizable. Source/cache/filter are unchanged.

```typescript
setSize(width: number, height: number): this
```

**Parameters**

- `width` — Required. Finite positive width in CSS px.
- `height` — Required. Finite positive height in CSS px.

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.setSize(220, 280)
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setStartItem`

Sets this view zero-based visible member offset to an unsigned integer [0, 4294967295].
This is navigation, not member identity or shared filter selection.

```typescript
setStartItem(index: number): Promise<boolean>
```

**Parameters**

- `index` — Required. Zero-based order/member offset as described above.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setStartItem(0)
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setStyle`

Sets only this view style override to an available Workbook builtin/custom style name.
Use clearStyle to restore the document default; source/cache/filter are unchanged.

```typescript
setStyle(style: string): Promise<boolean>
```

**Parameters**

- `style` — Required. Available Workbook builtin/custom style name.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.setStyle(styleNames[0])
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.setZOrder`

Sets only this Drawing order using the official command and its clamped zero-based order semantics.
Source/cache/filter are unchanged; valid resource-free placeholders remain arrangeable.

```typescript
setZOrder(index: number): this
```

**Parameters**

- `index` — Required. Zero-based order/member offset as described above.

**Returns**

This live facade after synchronous command acceptance (or an already-satisfied order); not remotely saved/rendered.

**Throws**

If the hosted Drawing is unavailable, input is invalid, permission is refused, or the synchronous command fails.

**Examples**

```ts
control.setZOrder(0)
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.subUnitId`

```typescript
readonly subUnitId: string
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.toBuilder`

Copies configuration into a detached Builder whose source setters remain locked after every fluent call.
No command runs; shared filtering/cache state is not duplicated.

```typescript
toBuilder(): FBoundSheetSlicerBuilder
```

**Returns**

A defensive current value (where applicable), with missing-resource behavior described above.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
const info = control.toBuilder().setCaption('Sales').setSize(260, 320).build()
```

**Types:** [`FBoundSheetSlicerBuilder`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer-builder.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.unitId`

```typescript
readonly unitId: string
```

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.update`

Atomically updates this view and Drawing placement through one undoable presentation command.
Source identity and report connections must match; use setConnections separately. All dimensions are CSS px.
Acceptance is local command completion, not remote persistence or rendering. Ordinary refusal rejects.
Exceptional inverse-recovery listener failure also rejects and may retain the coherent forward view/Drawing pair;
callers can re-read and reconcile that state.

```typescript
update(info: ISheetSlicerInfo): Promise<this>
```

**Parameters**

- `info` — Required. Detached information with locked source/connections and CSS px presentation.

**Returns**

This live facade after local command acceptance, not remote persistence/rendering.

**Throws**

If required source/host data is unavailable, input is unsupported, or the documented query/command fails.

**Examples**

```ts
await control.update(control.toBuilder().setCaption('Sales').setSize(260, 320).build())
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`ISheetSlicerInfo`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)

### `FSheetSlicer.updateSettings`

Patches this view at command execution time without overwriting unrelated queued settings.
Source/cache/connections/filter are unchanged. An own style: undefined clears the override; optional undefined keys clear.
Visual dimensions are CSS px; rowHeight persists as Math.round(px * 9525), within the unsigned EMU range.

```typescript
updateSettings(patch: Partial<SheetSlicerSettings>): Promise<boolean>
```

**Parameters**

- `patch` — Required. Presence-aware typed patch; own undefined clears optional values.

**Returns**

Whether the command was accepted; false on ordinary validation, permission or business-unavailable refusal.

**Throws**

The Promise rejects on unexpected command/listener errors; presentation inverse-recovery errors may require reconciliation.

**Examples**

```ts
const accepted = await control.updateSettings({ caption: 'Sales', style: undefined })
```

**Types:** [`Promise`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`Partial`](https://unpkg.com/@typescript/typescript-darwin-arm64/lib/lib.es5.d.ts) · [`SheetSlicerSettings`](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/sheets-slicer`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs-pro/sheets-slicer.md) · [Type definitions](https://unpkg.com/@univerjs-pro/sheets-slicer/lib/types/facade/f-slicer.d.ts)
