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.
🚨
The DBNum syntax is not supported.
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);