MCPcopy
hub / github.com/dream-num/univer

github.com/dream-num/univer @v0.25.1 sqlite

repository ↗ · DeepWiki ↗ · release v0.25.1 ↗
22,767 symbols 85,079 edges 5,494 files 2,051 documented · 9%
README
<img src="https://github.com/dream-num/univer/raw/v0.25.1/docs/img/banner-dark.png" alt="Univer" width="420" />

A full-stack, isomorphic office SDK for building spreadsheets, documents, and presentations.

Build embeddable productivity experiences with a plugin architecture, Canvas-based rendering, a formula engine, and one Facade API that works in the browser and on Node.js.

English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español

📖 Documentation | ✨ Showcase | 📘 API Reference | 📝 Blog

Release License Build CodeFactor Codecov

Stars Contributors Issues Last Commit

Discord Twitter Open Collective

Trendshift

✨ What is Univer?

Univer is an open-source SDK for creating office applications inside your own product. It gives you the building blocks for spreadsheet, document, and presentation experiences without forcing you into a hosted app or a fixed UI.

Use Univer when you need to:

  • Embed spreadsheet or document editing into a SaaS product, internal tool, BI workflow, or AI application.
  • Run workbook/document processing on the server with the same architecture used in the browser.
  • Compose only the features you need through plugins or start quickly with presets.
  • Extend behavior through custom plugins, commands, services, UI components, and Facade APIs.

Univer is not a spreadsheet file viewer only. It is a framework for building your own productivity surface.

🌟 Highlights

Built for large surfaces Canvas-based rendering and a dedicated formula engine keep complex workbooks responsive. 🧩 Plugin-shaped by default Compose, replace, lazy-load, or extend capabilities without taking the whole stack. 🤖 Headless for AI infrastructure Run workbook and document logic in Node.js to power agents, automation, and server-side workflows.
🛠️ Product-ready SDK Framework adapters, Facade APIs, presets, and headless runtime fit real integration paths. 🌗 Dark-mode ready UI components and the rendering engine both adapt to light and dark themes. 🔌 Unified Facade API One consistent API surface for workbooks, ranges, formulas, and documents across browser and Node.js.

🚀 Why Univer?

  • Isomorphic by design: run UI apps in browsers and headless processing in Node.js.
  • Plugin-first architecture: every capability is delivered as a composable plugin, so features can be added, removed, replaced, or lazy-loaded.
  • Preset mode for fast integration: use curated plugin bundles from univer-presets when you want a working app quickly.
  • Plugin mode for full control: manually compose packages when you need custom loading, smaller bundles, or deep integration.
  • Facade API: work with workbooks, worksheets, ranges, documents, formulas, commands, and events through a higher-level API.
  • Canvas rendering engine: support large editable document surfaces with a rendering layer shared across document types.
  • Extensible UI: integrate with React, Vue, Web Components, and framework-specific application shells.

⚡ Quick Start

For most applications, start with Preset Mode. Use Plugin Mode when you need to manually compose packages and control plugin registration.

Preset Mode (recommended)

Presets are curated collections of Univer plugins that include the required Facade API registrations and styles.

pnpm add @univerjs/presets @univerjs/preset-sheets-core
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core'
import UniverPresetSheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US'
import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'

import '@univerjs/preset-sheets-core/lib/index.css'

const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(UniverPresetSheetsCoreEnUS),
  },
  presets: [
    UniverSheetsCorePreset({
      container: 'app',
    }),
  ],
})

univerAPI.createWorkbook({})

Plugin Mode

Plugin Mode gives you lower-level control over packages, style imports, locale merging, Facade API registration, and plugin order.

pnpm add @univerjs/core @univerjs/design @univerjs/docs @univerjs/docs-ui @univerjs/engine-formula @univerjs/engine-render @univerjs/sheets @univerjs/sheets-formula @univerjs/sheets-formula-ui @univerjs/sheets-numfmt @univerjs/sheets-numfmt-ui @univerjs/sheets-ui @univerjs/ui
import { LocaleType, mergeLocales, Univer } from '@univerjs/core'
import { FUniver } from '@univerjs/core/facade'
import DesignEnUS from '@univerjs/design/locale/en-US'
import { UniverDocsPlugin } from '@univerjs/docs'
import { UniverDocsUIPlugin } from '@univerjs/docs-ui'
import DocsUIEnUS from '@univerjs/docs-ui/locale/en-US'
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'
import { UniverRenderEnginePlugin } from '@univerjs/engine-render'
import { UniverSheetsPlugin } from '@univerjs/sheets'
import SheetsEnUS from '@univerjs/sheets/locale/en-US'
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula'
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui'
import SheetsFormulaUIEnUS from '@univerjs/sheets-formula-ui/locale/en-US'
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt'
import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui'
import SheetsNumfmtUIEnUS from '@univerjs/sheets-numfmt-ui/locale/en-US'
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'
import SheetsUIEnUS from '@univerjs/sheets-ui/locale/en-US'
import { UniverUIPlugin } from '@univerjs/ui'
import UIEnUS from '@univerjs/ui/locale/en-US'

import '@univerjs/design/lib/index.css'
import '@univerjs/ui/lib/index.css'
import '@univerjs/docs-ui/lib/index.css'
import '@univerjs/sheets-ui/lib/index.css'
import '@univerjs/sheets-formula-ui/lib/index.css'
import '@univerjs/sheets-numfmt-ui/lib/index.css'

import '@univerjs/engine-formula/facade'
import '@univerjs/ui/facade'
import '@univerjs/docs-ui/facade'
import '@univerjs/sheets/facade'
import '@univerjs/sheets-ui/facade'
import '@univerjs/sheets-formula/facade'
import '@univerjs/sheets-numfmt/facade'

const univer = new Univer({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(
      DesignEnUS,
      UIEnUS,
      DocsUIEnUS,
      SheetsEnUS,
      SheetsUIEnUS,
      SheetsFormulaUIEnUS,
      SheetsNumfmtUIEnUS,
    ),
  },
})

univer.registerPlugin(UniverRenderEnginePlugin)
univer.registerPlugin(UniverFormulaEnginePlugin)
univer.registerPlugin(UniverUIPlugin, { container: 'app' })
univer.registerPlugin(UniverDocsPlugin)
univer.registerPlugin(UniverDocsUIPlugin)
univer.registerPlugin(UniverSheetsPlugin)
univer.registerPlugin(UniverSheetsUIPlugin)
univer.registerPlugin(UniverSheetsFormulaPlugin)
univer.registerPlugin(UniverSheetsFormulaUIPlugin)
univer.registerPlugin(UniverSheetsNumfmtPlugin)
univer.registerPlugin(UniverSheetsNumfmtUIPlugin)

const univerAPI = FUniver.newAPI(univer)
univerAPI.createWorkbook({})

Your page needs a container:






Learn more in the Installation & Basic Usage guide, the createUniver reference, and the Facade API reference.

🧩 Preset Mode vs Plugin Mode

Choose When to use it Start here
Preset Mode You want a working Sheets, Docs, or Node setup with minimal configuration. univer-presets and the getting started guide
Plugin Mode You need strict control over packages, plugin registration order, lazy loading, or custom runtime composition. This repository's examples/ and architecture guide
Headless Mode You need server-side workbook/document processing, formula calculation, or automation without UI. Headless Univer

Keep all @univerjs/* packages on the same version. If you use Univer Pro packages, keep @univerjs-pro/* versions aligned as well.

🧭 Compatibility

  • Browser runtime: Univer is compiled with a Chrome 70 target and aims to work on Edge >=70, Firefox >=63, Chrome >=70, Safari >=12.0, and Electron >=5.
  • Polyfills: Univer relies on Intl.Segmenter. Add a polyfill such as @formatjs/intl-segmenter if your target browser or runtime does not provide it.
  • Build tools: We recommend Vite, esbuild, or Webpack 5. If your build tool does not support the exports field in package.json (common in Webpack 4), you may need extra path mapping.
  • React: Univer's view layer is built on React 18, supports React 18 and 19, and provides minimal compatibility support for React 16.9+ and 17.
  • Node.js runtime: Headless Univer supports Node.js >=18.17.0. Developing this monorepo requires Node.js >=22.18.

🛠️ What You Can Build

Area Open-source capabilities
Sheets Workbooks, worksheets, ranges, selection, formulas, number formatting, filtering, sorting, data validation, conditional formatting, hyperlinks, comments, find and replace, notes, tables, drawing integration, and extensible UI plugins.
Docs Rich document model, editing UI, lists, hyperlinks, drawing integration, comments, quick insert, and shared document architecture.
Slides Presentation data model and UI packages under active development.
Runtime Browser apps, Node.js headless usage, Web Worker/RPC patterns, multi-instance usage, and server-oriented automation.
Integrations React, Vue, Web Components, framework templates, theming, localization, and custom plugins.

Sheets are the most mature product surface today. Docs and Slides share Univer's architecture and continue to evolve in the same SDK.

🔓 Open Source and Pro

This repository contains Univer's open-source core and first-party OSS plugins. Some enterprise features are developed as Univer Pro packages and require separate integration.

Open source Univer Pro / commercial
Core SDK, plugin system, rendering engine, formula engine, Facade API, Sheets/Docs/Slides packages, themes, i18n, and many first-party plugins. Real-time collaboration, import/export, printing, charts, pivot tables, sparklines, advanced formula capabilities, edit history, Pro server components, and license management.

Pro features are documented in the Univer Pro guide. They are intentionally separated here so the OSS package surface is clear.

🌐 Ecosystem

Extension points exported contracts — how you extend this code

IMarkSelectionService (Interface)
(no doc) [6 implementers]
packages/sheets-ui/src/services/mark-selection/mark-selection.service.ts
ITelemetryService (Interface)
(no doc) [15 implementers]
packages/telemetry/src/services/telemetry.service.ts
IBreakPoints (Interface)
(no doc) [6 implementers]
packages/engine-render/src/components/docs/layout/line-breaker/line-breaker.ts
IHTTPImplementation (Interface)
(no doc) [9 implementers]
packages/network/src/services/http/implementations/implementation.ts
IUniscriptExecutionService (Interface)
(no doc) [18 implementers]
packages/uniscript/src/services/script-execution.service.ts
ICellCustomRender (Interface)
(no doc) [13 implementers]
packages/core/src/types/interfaces/i-cell-custom-render.ts
INotificationService (Interface)
(no doc) [9 implementers]
packages/ui/src/services/notification/notification.service.ts
IMessageProtocol (Interface)
(no doc) [8 implementers]
packages/rpc/src/services/rpc/rpc.service.ts

Core symbols most depended-on inside this repo

create
called by 12556
packages/engine-render/src/render-manager/render-manager.service.ts
calculate
called by 4766
packages/engine-formula/src/services/calculate-formula.service.ts
get
called by 4610
packages/engine-formula/src/services/active-dirty-manager.service.ts
getObjectValue
called by 3610
packages/engine-formula/src/functions/util.ts
push
called by 2710
packages/core/src/docs/data-model/text-x/text-x.ts
getValue
called by 2671
packages/sheets/src/services/numfmt/type.ts
executeCommand
called by 1685
packages/core/src/services/command/command.service.ts
forEach
called by 1564
packages/core/src/shared/row-col-iter.ts

Shape

Method 11,576
Function 5,064
Class 3,367
Interface 2,418
Enum 342

Languages

TypeScript100%

Modules by API surface

packages/engine-formula/src/engine/value-object/primitive-object.ts170 symbols
packages/core/src/docs/data-model/rich-text-builder.ts145 symbols
packages/engine-formula/src/engine/value-object/array-value-object.ts117 symbols
packages/engine-formula/src/services/runtime.service.ts114 symbols
packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts114 symbols
packages/engine-render/src/context.ts107 symbols
packages/sheets/src/facade/f-worksheet.ts104 symbols
packages/find-replace/src/services/find-replace.service.ts104 symbols
packages/engine-render/src/scene.ts103 symbols
packages/engine-formula/src/engine/value-object/base-value-object.ts96 symbols
packages/engine-formula/src/engine/reference-object/base-reference-object.ts94 symbols
packages/sheets/src/facade/f-range.ts93 symbols

Dependencies from manifests, versioned

@commitlint/cli20.5.3 · 1×
@commitlint/config-conventional20.5.3 · 1×
@eslint-react/eslint-plugin2.13.0 · 1×
@eslint/compat2.0.5 · 1×
@flatten-js/interval-tree1.1.3 · 1×
@floating-ui/dom1.7.4 · 1×
@floating-ui/utils0.2.10 · 1×
@grpc/grpc-js1.14.3 · 1×
@lit/react1.0.8 · 1×
@playwright/test1.57.0 · 1×

For agents

$ claude mcp add univer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact