GuidesUniver SheetsFeaturesFind & Replace

Find & Replace

Facade APIHas Paid PlanUniver ServerUniver on Node.jsPreset
----UniverSheetsFindReplacePreset

The Find and Replace plug-in provides the function of finding and replacing cells.

This feature includes the following plugin packages:

Presets Installation

import { createUniver, defaultTheme, LocaleType, merge } from '@univerjs/presets';
import { UniverSheetsCorePreset } from '@univerjs/presets/preset-sheets-core';
import UniverPresetSheetsCoreEnUS from '@univerjs/presets/preset-sheets-core/locales/en-US';
import { UniverSheetsFindReplacePreset } from '@univerjs/presets/preset-sheets-find-replace';
import UniverPresetSheetsFindReplaceEnUS from '@univerjs/presets/preset-sheets-find-replace/locales/en-US';
 
import '@univerjs/presets/lib/styles/preset-sheets-find-replace.css'
 
const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: merge(
      {},
      UniverPresetSheetsCoreEnUS,
      UniverPresetSheetsFindReplaceEnUS 
    ),
  },
  theme: defaultTheme,
  presets: [
    UniverSheetsCorePreset(),
    UniverSheetsFindReplacePreset(),
  ],
});

Piecemeal Installation

npm install @univerjs/find-replace @univerjs/sheets-find-replace
import { LocaleType, merge, Univer } from '@univerjs/core';
import { defaultTheme } from "@univerjs/design";
import { UniverFindReplacePlugin } from '@univerjs/find-replace';
import { UniverSheetsFindReplacePlugin } from '@univerjs/sheets-find-replace';
import FindReplaceEnUS from '@univerjs/find-replace/locale/en-US';
import SheetsFindReplaceEnUS from '@univerjs/sheets-find-replace/locale/en-US';
 
import '@univerjs/find-replace/lib/index.css';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: merge(
      FindReplaceEnUS,
      SheetsFindReplaceEnUS
    ),
  },
});
 
univer.registerPlugin(UniverFindReplacePlugin);
univer.registerPlugin(UniverSheetsFindReplacePlugin);

Was this page helpful?