@univerjs/sheets provides the core spreadsheet data model and business logic for Univer Sheets, independent of the UI layer.
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
|---|---|---|---|---|---|
@univerjs/sheets |
UniverSheets |
No | Yes | Yes | Yes |
pnpm add @univerjs/sheets
# or
npm install @univerjs/sheetsStart with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
import EnUS from '@univerjs/sheets/locale/en-US';
import { UniverSheetsPlugin } from '@univerjs/sheets';
univer.registerPlugin(UniverSheetsPlugin);
// Merge EnUS into your Univer locale map when this package contributes UI text.On the main thread, import UniverSheetsPlugin from @univerjs/sheets. Set notExecuteFormula: true to delegate calculation to the worker.
In the worker entry, import UniverSheetsPlugin from @univerjs/sheets/worker:
import { UniverSheetsPlugin } from '@univerjs/sheets/worker';
univer.registerPlugin(UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true });- Import
@univerjs/sheets/facadewhen using this package through Univer Facade APIs.