# Find & Replace

- Human documentation: [https://docs.univer.ai/reference/facade/find-replace](https://docs.univer.ai/reference/facade/find-replace)

- Agent Markdown: [https://docs.univer.ai/reference/facade/find-replace.md](https://docs.univer.ai/reference/facade/find-replace.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

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

---

| Packages | `@univerjs/sheets-find-replace` |
| -------- | ------------------------------- |

This interface class provides methods to find and replace text in the univer.

> This class should not be instantiated directly. Use factory methods on `univerAPI` instead.

## Overview

### @univerjs/sheets-find-replace

| Method                                            | Description |
| ------------------------------------------------- | ----------- |
| [`ensureCompleteAsync`](#ensurecompleteasync)     | -           |
| [`findAll`](#findall)                             | -           |
| [`findNext`](#findnext)                           | -           |
| [`findPrevious`](#findprevious)                   | -           |
| [`getCurrentMatch`](#getcurrentmatch)             | -           |
| [`matchCaseAsync`](#matchcaseasync)               | -           |
| [`matchEntireCellAsync`](#matchentirecellasync)   | -           |
| [`matchFormulaTextAsync`](#matchformulatextasync) | -           |
| [`replaceAllWithAsync`](#replaceallwithasync)     | -           |
| [`replaceWithAsync`](#replacewithasync)           | -           |

## APIs

### Getters & Queries

### `findAll`

**Signature**

```typescript
findAll(): FRange[]
```

**Returns**

* `FRange[]` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `findNext`

**Signature**

```typescript
findNext(): Nullable<FRange>
```

**Returns**

* `any` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `findPrevious`

**Signature**

```typescript
findPrevious(): Nullable<FRange>
```

**Returns**

* `any` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `getCurrentMatch`

**Signature**

```typescript
getCurrentMatch(): Nullable<FRange>
```

**Returns**

* `any` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### Miscellaneous

### `ensureCompleteAsync`

**Signature**

```typescript
async ensureCompleteAsync(): Promise<Nullable<IFindComplete>>
```

**Returns**

* `Promise<Nullable<IFindComplete<IFindMatch<unknown>>>>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `matchCaseAsync`

**Signature**

```typescript
async matchCaseAsync(matchCase: boolean): Promise<IFTextFinder>
```

**Parameters**

* `matchCase` `boolean` — *No description*

**Returns**

* `Promise<IFTextFinder>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `matchEntireCellAsync`

**Signature**

```typescript
async matchEntireCellAsync(matchEntireCell: boolean): Promise<IFTextFinder>
```

**Parameters**

* `matchEntireCell` `boolean` — *No description*

**Returns**

* `Promise<IFTextFinder>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `matchFormulaTextAsync`

**Signature**

```typescript
async matchFormulaTextAsync(matchFormulaText: boolean): Promise<IFTextFinder>
```

**Parameters**

* `matchFormulaText` `boolean` — *No description*

**Returns**

* `Promise<IFTextFinder>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `replaceAllWithAsync`

**Signature**

```typescript
async replaceAllWithAsync(replaceText: string): Promise<number>
```

**Parameters**

* `replaceText` `string` — *No description*

**Returns**

* `Promise<number>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`

### `replaceWithAsync`

**Signature**

```typescript
async replaceWithAsync(replaceText: string): Promise<boolean>
```

**Parameters**

* `replaceText` `string` — *No description*

**Returns**

* `Promise<boolean>` — See signature above.

Source: 

`@univerjs/sheets-find-replace`
