Univer
Univer Sheet
Features
Number Format

Number Format

📊 Univer Sheet

The number format plugin provides the formatting function of numbers in cells, including the number of decimal places, thousands separator, currency symbol, etc.

Installation

pnpm add @univerjs/sheets-numfmt

Import

import '@univerjs/sheets-numfmt/lib/index.css';
 
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';

Internationalization

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

Register

univer.registerPlugin(UniverSheetsNumfmtPlugin);

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