Univer
Univer Sheet
Features
Conditional Formatting

Conditional Formatting

📊 Univer Sheet

Conditional formatting is a feature that sets rules in cells to automatically set cell formats based on the value of the data.

Installation

pnpm add @univerjs/sheets-conditional-formatting @univerjs/sheets-conditional-formatting-ui

Import

import '@univerjs/sheets-conditional-formatting-ui/lib/index.css';
 
import { UniverSheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting';
import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui';

Internationalization

import { LocaleType, Tools } from '@univerjs/core';
import SheetsConditionalFormattingUIEnUS from '@univerjs/sheets-conditional-formatting-ui/locale/en-US';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: Tools.deepMerge(
      SheetsConditionalFormattingUIEnUS
    ),
  },
});

Register

univer.registerPlugin(UniverSheetsConditionalFormattingPlugin);
univer.registerPlugin(UniverSheetsConditionalFormattingUIPlugin);

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.