GetNotes Tools
dream-num/univer
Tool นี้คืออะไร
Univer คือ SDK แบบโอเพนซอร์สที่ช่วยให้นักพัฒนาสามารถสร้างแอปพลิเคชันสำนักงานแบบฝังตัว เช่น สเปรดชีต เอกสาร และงานนำเสนอ ภายในผลิตภัณฑ์ของตนเองได้ โดยมีสถาปัตยกรรมปลั๊กอินที่ยืดหยุ่นและรองรับการทำงานทั้งในเบราว์เซอร์และบน Node.js
ข้อมูลโปรเจกต์
ดาว
13.8K
Forks
1.2K
License
Apache-2.0
อัปเดต GitHub ล่าสุด
16 ก.ค. 2569
เพิ่มใน GetNotes
17 ก.ค. 2569
Repository
dream-num/univer
รูปแบบ
เหมาะกับงาน
เหมาะกับอาชีพ
Ecosystem
TypeScript
แปลและเรียบเรียงโดย AI
เนื้อหาฉบับภาษาไทย
ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง
SDK สำหรับสำนักงานแบบฟูลสแตกและไอโซมอร์ฟิก สำหรับสร้างสเปรดชีต เอกสาร และงานนำเสนอ
สร้างประสบการณ์การทำงานที่มีประสิทธิภาพที่สามารถฝังได้ ด้วยสถาปัตยกรรมปลั๊กอิน การเรนเดอร์แบบ Canvas เอ็นจินสูตรคำนวณ และ Facade API เดียวที่ทำงานได้ทั้งในเบราว์เซอร์และบน Node.js
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español
📖 เอกสารประกอบ | ✨ ตัวอย่างผลงาน | 📘 เอกสารอ้างอิง API | 📝 บล็อก
✨ Univer คืออะไร?
Univer คือ SDK แบบโอเพนซอร์สสำหรับสร้างแอปพลิเคชันสำนักงานภายในผลิตภัณฑ์ของคุณเอง มันมอบส่วนประกอบพื้นฐานสำหรับประสบการณ์การใช้งานสเปรดชีต เอกสาร และงานนำเสนอ โดยไม่บังคับให้คุณใช้แอปที่โฮสต์ไว้หรือ UI ที่ตายตัว
ใช้ Univer เมื่อคุณต้องการ:
- ฝังการแก้ไขสเปรดชีตหรือเอกสารลงในผลิตภัณฑ์ SaaS, เครื่องมือภายใน, เวิร์กโฟลว์ BI หรือแอปพลิเคชัน AI
- เรียกใช้การประมวลผลเวิร์กบุ๊ก/เอกสารบนเซิร์ฟเวอร์ด้วยสถาปัตยกรรมเดียวกับที่ใช้ในเบราว์เซอร์
- ประกอบเฉพาะฟีเจอร์ที่คุณต้องการผ่านปลั๊กอิน หรือเริ่มต้นได้อย่างรวดเร็วด้วยพรีเซ็ต
- ขยายพฤติกรรมผ่านปลั๊กอินที่กำหนดเอง, คำสั่ง, บริการ, ส่วนประกอบ UI และ Facade API
Univer ไม่ใช่แค่โปรแกรมดูไฟล์สเปรดชีตเท่านั้น แต่เป็นเฟรมเวิร์กสำหรับสร้างพื้นที่การทำงานที่มีประสิทธิภาพของคุณเอง
🌟 จุดเด่น
🚀 ทำไมต้อง Univer?
- ออกแบบมาให้เป็น Isomorphic: เรียกใช้แอป UI ในเบราว์เซอร์และการประมวลผลแบบ Headless ใน Node.js
- สถาปัตยกรรมแบบ Plugin-first: ทุกความสามารถถูกส่งมอบในรูปแบบปลั๊กอินที่สามารถประกอบได้ ทำให้สามารถเพิ่ม, ลบ, แทนที่ หรือโหลดแบบ Lazy-load ฟีเจอร์ต่างๆ ได้
- โหมด Preset สำหรับการรวมระบบที่รวดเร็ว: ใช้ชุดปลั๊กอินที่คัดสรรแล้วจาก
univer-presetsเมื่อคุณต้องการแอปที่ใช้งานได้รวดเร็ว - โหมด Plugin สำหรับการควบคุมเต็มรูปแบบ: ประกอบแพ็กเกจด้วยตนเองเมื่อคุณต้องการการโหลดที่กำหนดเอง, ขนาดบันเดิลที่เล็กลง หรือการรวมระบบที่ลึกซึ้ง
- Facade API: ทำงานกับเวิร์กบุ๊ก, เวิร์กชีต, ช่วงข้อมูล, เอกสาร, สูตรคำนวณ, คำสั่ง และเหตุการณ์ต่างๆ ผ่าน API ระดับสูง
- เอ็นจินการเรนเดอร์แบบ Canvas: รองรับพื้นผิวเอกสารขนาดใหญ่ที่แก้ไขได้ ด้วยเลเยอร์การเรนเดอร์ที่ใช้ร่วมกันในเอกสารหลายประเภท
- UI ที่ขยายได้: รวมเข้ากับ React, Vue, Web Components และ Application Shells เฉพาะเฟรมเวิร์ก
⚡ เริ่มต้นใช้งานอย่างรวดเร็ว
สำหรับแอปพลิเคชันส่วนใหญ่ ให้เริ่มต้นด้วย Preset Mode ใช้ Plugin Mode เมื่อคุณต้องการประกอบแพ็กเกจด้วยตนเองและควบคุมการลงทะเบียนปลั๊กอิน
Presets คือชุดรวมปลั๊กอินของ Univer ที่คัดสรรมาแล้ว ซึ่งรวมถึงการลงทะเบียน Facade API และสไตล์ที่จำเป็น
pnpm add @univerjs/presets @univerjs/preset-sheets-coreimport { 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 ช่วยให้คุณควบคุมแพ็กเกจ, การนำเข้าสไตล์, การรวมภาษา, การลงทะเบียน Facade API และลำดับปลั๊กอินได้ในระดับที่ต่ำกว่า
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/uiimport { 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 SheetsFormulaEnUS from '@univerjs/sheets-formula/locale/en-US'
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/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,
SheetsFormulaEnUS,
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({})หน้าของคุณต้องมีคอนเทนเนอร์:
<div id="app" style="height: 100vh"></div>เรียนรู้เพิ่มเติมใน คู่มือการติดตั้งและการใช้งานพื้นฐาน, การอ้างอิง createUniver และการอ้างอิง Facade API
🧩 โหมดพรีเซ็ต vs โหมดปลั๊กอิน
| เลือก | ใช้เมื่อไหร่ | เริ่มต้นที่นี่ |
|---|---|---|
| โหมดพรีเซ็ต | คุณต้องการ Sheets, Docs หรือ Node ที่ทำงานได้โดยมีการกำหนดค่าน้อยที่สุด | univer-presets และ คู่มือเริ่มต้นใช้งาน |
| โหมดปลั๊กอิน | คุณต้องการการควบคุมที่เข้มงวดเกี่ยวกับแพ็กเกจ, ลำดับการลงทะเบียนปลั๊กอิน, การโหลดแบบ Lazy Loading หรือการจัดองค์ประกอบรันไทม์แบบกำหนดเอง | examples/ ของรีโพซิโทรีนี้ และ คู่มือสถาปัตยกรรม |
| โหมด Headless | คุณต้องการการประมวลผลเวิร์กบุ๊ก/เอกสารฝั่งเซิร์ฟเวอร์, การคำนวณสูตร หรือระบบอัตโนมัติที่ไม่มี UI | Headless Univer |
โปรดใช้แพ็กเกจ @univerjs/* ทั้งหมดในเวอร์ชันเดียวกัน หากคุณใช้แพ็กเกจ Univer Pro โปรดรักษาเวอร์ชันของ @univerjs-pro/* ให้ตรงกันด้วย
สำหรับความคาดหวังด้านความเข้ากันได้ของ API, API ทดลอง, API ภายใน และกฎการเลิกใช้งาน โปรดดูที่ นโยบายความเสถียรของ API
🧭 ความเข้ากันได้
- รันไทม์ของเบราว์เซอร์: Univer ถูกคอมไพล์โดยมีเป้าหมายเป็น Chrome 70 และมุ่งมั่นที่จะทำงานบน Edge
>=70, Firefox>=63, Chrome>=70, Safari>=12.0และ Electron>=5 - โพลีฟิลล์: Univer อาศัย
Intl.Segmenterเพิ่มโพลีฟิลล์เช่น@formatjs/intl-segmenterหากเบราว์เซอร์เป้าหมายหรือรันไทม์ของคุณไม่มีให้ - เครื่องมือบิลด์: เราแนะนำ Vite, esbuild หรือ Webpack 5 หากเครื่องมือบิลด์ของคุณไม่รองรับฟิลด์
exportsในpackage.json(พบบ่อยใน Webpack 4) คุณอาจต้องมีการแมปพาธเพิ่มเติม - React: เลเยอร์มุมมองของ Univer สร้างขึ้นบน React 18 รองรับ React 18 และ 19 และให้การสนับสนุนความเข้ากันได้ขั้นต่ำสำหรับ React 16.9+ และ 17
- รันไทม์ของ Node.js: Headless Univer รองรับ Node.js
>=18.17.0การพัฒนา monorepo นี้ต้องใช้ Node.js>=22.18
🛠️ สิ่งที่คุณสามารถสร้างได้
| ส่วน | ความสามารถแบบโอเพนซอร์ส | ส่วนขยาย Univer Pro |
|---|---|---|
| Sheets | เวิร์กบุ๊ก, เวิร์กชีต, ช่วง, การเลือก, สูตร, การจัดรูปแบบตัวเลข, การกรอง, การจัดเรียง, การตรวจสอบข้อมูล, การจัดรูปแบบตามเงื่อนไข, ไฮเปอร์ลิงก์, ความคิดเห็น, การค้นหาและแทนที่, บันทึก, ตาราง, การรวมการวาด และปลั๊กอิน UI ที่ขยายได้ | การทำงานร่วมกันแบบเรียลไทม์, ประวัติการแก้ไข, การนำเข้า/ส่งออก, การพิมพ์, แผนภูมิ, Pivot Tables, Sparklines, โครงร่าง, รูปร่าง, กราฟิกในเซลล์, ตัวเชื่อมต่อข้อมูล, การคำนวณฝั่งเซิร์ฟเวอร์ และคุณสมบัติสูตรที่เพิ่มประสิทธิภาพ |
| Docs | โมเดลเอกสารที่สมบูรณ์, UI การแก้ไข, รายการ, ไฮเปอร์ลิงก์, การรวมการวาด, ความคิดเห็น, การแทรกด่วน และสถาปัตยกรรมเอกสารที่ใช้ร่วมกัน | การทำงานร่วมกัน, การนำเข้า/ส่งออก, การพิมพ์, ตารางและรายการที่ปรับปรุง, คอลัมน์, คำบรรยาย, บล็อกโค้ด, คำพูด, รูปร่าง และทรัพยากรความคิดเห็นระยะไกล |
| Slides | โมเดลข้อมูลการนำเสนอและแพ็กเกจ UI ที่อยู่ระหว่างการพัฒนา | โมเดลและ UI ของ Pro Slide, การนำเข้า/ส่งออกสไลด์, ปลั๊กอินโมเดล/UI แผนภูมิและตาราง และโครงสร้างพื้นฐานการแก้ไขรูปร่างที่ใช้ร่วมกัน |
| Bases | สร้างประสบการณ์ข้อมูลที่มีโครงสร้างแบบกำหนดเองบนสถาปัตยกรรมปลั๊กอิน, คำสั่ง และโมเดลของ Univer | โมเดลฐานข้อมูลพื้นฐาน, คำสั่ง, การรวมสูตร, UI เวิร์กเบนช์, ตัวแก้ไขฟิลด์ และมุมมองเอ็นจิ้นการเรนเดอร์ |
| Runtime | แอปเบราว์เซอร์, การใช้งาน Headless Node.js, รูปแบบ Web Worker/RPC, การใช้งานหลายอินสแตนซ์ และระบบอัตโนมัติที่เน้นเซิร์ฟเวอร์ | แพ็กเกจไคลเอ็นต์/เซิร์ฟเวอร์สำหรับการทำงานร่วมกัน, ไคลเอ็นต์การทำงานร่วมกันของ Node.js, บริการเซิร์ฟเวอร์ Pro, SSR, การมอบหมายการประมวลผล, การคำนวณฝั่งเซิร์ฟเวอร์ และเครื่องมือเล่นซ้ำการเปลี่ยนแปลง |
| Integrations | React, Vue, Web Components, เทมเพลตเฟรมเวิร์ก, การจัดธีม, การแปล และปลั๊กอินที่กำหนดเอง | พรีเซ็ต Pro และแพ็กเกจการปรับใช้ระดับองค์กร |
Sheets เป็นผลิตภัณฑ์ที่สมบูรณ์ที่สุดในปัจจุบัน Docs และ Slides ใช้สถาปัตยกรรมของ Univer ร่วมกันและยังคงพัฒนาต่อไปใน SDK เดียวกัน
🔓 โอเพนซอร์สและ Pro
รีโพซิโทรีนี้ประกอบด้วยแกนหลักโอเพนซอร์สของ Univer และปลั๊กอิน OSS บุคคลที่หนึ่ง Univer Pro ได้รับการพัฒนาแยกต่างหากในฐานะเลเยอร์ส่วนขยายเชิงพาณิชย์สำหรับพื้นผิวผลิตภัณฑ์ขั้นสูง, การทำงานร่วมกัน, คุณสมบัติเซิร์ฟเวอร์ และการรวมระบบระดับองค์กร
| หมวดหมู่ | โอเพนซอร์ส | Univer Pro / เชิงพาณิชย์ |
|---|---|---|
| รากฐาน | Core SDK, ระบบปลั๊กอิน, เอ็นจิ้นการเรนเดอร์, เอ็นจิ้นสูตร, Facade API, ธีม, i18n และอะแดปเตอร์เฟรมเวิร์ก | พรีเซ็ต Pro และแพ็กเกจการปรับใช้ระดับองค์กร |
| Sheets | การแก้ไขสเปรดชีตหลัก, สูตร, การจัดรูปแบบตัวเลข, การกรอง/จัดเรียง, การตรวจสอบข้อมูล, การจัดรูปแบบตามเงื่อนไข, บันทึก, ตาราง, ไฮเปอร์ลิงก์, ความคิดเห็น, การวาด, การค้นหาและแทนที่ | การทำงานร่วมกัน, ประวัติการแก้ไข, การนำเข้า/ส่งออก, การพิมพ์, แผนภูมิ, Pivot Tables, Sparklines, โครงร่าง, รูปร่าง, กราฟิกในเซลล์, ตัวเชื่อมต่อข้อมูล, การประมวลผลช่วงล่วงหน้า และคุณสมบัติเอ็นจิ้นสูตรที่ปรับปรุง |
| Docs | โมเดลเอกสารและ UI ตัวแก้ไข, รายการ, ไฮเปอร์ลิงก์, ความคิดเห็น, การแทรกด่วน และการรวมการวาด | การทำงานร่วมกัน, การนำเข้า/ส่งออก, การพิมพ์, ตาราง/รายการที่ปรับปรุง, คอลัมน์, คำบรรยาย, บล็อกโค้ด, คำพูด, รูปร่าง และทรัพยากรความคิดเห็นแบบเธรดระยะไกล |
| Slides | โมเดลการนำเสนอ OSS และแพ็กเกจ UI | โมเดล/แพ็กเกจ UI ของ Pro Slide, การนำเข้า/ส่งออกสไลด์, แผนภูมิ, ตาราง และ UI ตัวแก้ไขรูปร่างที่นำกลับมาใช้ใหม่ได้ |
| Bases | สถาปัตยกรรมปลั๊กอินที่ขยายได้สำหรับผลิตภัณฑ์ที่เน้นข้อมูลแบบกำหนดเอง | โมเดลหลักของฐานข้อมูลพื้นฐาน, คำสั่ง, การเปลี่ยนแปลง, การรวมสูตร, UI เวิร์กเบนช์, ตัวแก้ไขฟิลด์ และการรวมเอ็นจิ้นการเรนเดอร์ |
| เซิร์ฟเวอร์และรันไทม์ | รันไทม์ Headless Node.js, รูปแบบ RPC/Web Worker และพื้นฐานระบบอัตโนมัติที่เน้นเซิร์ฟเวอร์ | เซิร์ฟเวอร์การทำงานร่วมกัน, ไคลเอ็นต์การทำงานร่วมกันของ Node.js, บริการ SSR, การมอบหมายการประมวลผล, การคำนวณฝั่งเซิร์ฟเวอร์ และเครื่องมือเล่นซ้ำการเปลี่ยนแปลงสำหรับการทำงานร่วมกัน |
คุณสมบัติ Pro มีเอกสารอยู่ใน คู่มือ Univer Pro คุณสมบัติเหล่านี้ถูกแยกออกจากกันโดยเจตนาเพื่อให้พื้นผิวแพ็กเกจ OSS ชัดเจน
หลักการขอบเขต:
- แพ็กเกจ OSS ในรีโพซิโทรีนี้มีวัตถุประสงค์เพื่อให้มีประโยชน์ด้วยตัวเองภายใต้ใบอนุญาต Apache-2.0 Univer Pro เป็นทางเลือกและไม่จำเป็นต้องใช้ API ของ OSS SDK สาธารณะ
- ข้อบกพร่อง, การถดถอย และปัญหาด้านความปลอดภัยในแพ็กเกจ OSS ควรได้รับการรายงานและแก้ไขในรีโพซิโทรี OSS แม้ว่าจะมีคุณสมบัติ Pro ที่เกี่ยวข้องอยู่ก็ตาม
- เอกสารประกอบ OSS ไม่ควรบ่งบอกว่าความสามารถเฉพาะ Pro มีอยู่ในแพ็กเกจ
@univerjs/*สาธารณะ API, แพ็กเกจ และเส้นทางการปรับใช้เฉพาะ Pro ควรได้รับการระบุชื่ออย่างชัดเจน - เมื่อคุณสมบัติ OSS มีการปรับปรุง Pro พฤติกรรม OSS ควรยังคงได้รับการบันทึกอย่างอิสระเพื่อให้ผู้ใช้สามารถประเมินพื้นผิวโอเพนซอร์สได้โดยไม่ต้องอ่านเอกสารเชิงพาณิชย์ก่อน
🌐 ระบบนิเวศ
- Core SDK:
dream-num/univer, monorepo นี้ - Presets:
dream-num/univer-presets, ชุดปลั๊กอินที่คัดสรรมาสำหรับแอปเบราว์เซอร์และ Node.js - AI agent skills:
dream-num/univer-sdk-skills, คำแนะนำที่นำกลับมาใช้ใหม่ได้สำหรับ AI agent ที่ทำงานร่วมกับการรวม Univer, คุณสมบัติ Pro, การพัฒนาปลั๊กอิน และแบ็กเอนด์ Node ดู คู่มือ AI Skills - เอกสารประกอบ: docs.univer.ai, รวมถึง Sheets, Docs, Slides, สูตรอาหาร และคู่มือ Pro
- การอ้างอิง API: docs.univer.ai/reference, Facade API และการอ้างอิง API ที่สร้างขึ้น
- ตัวอย่างและการแสดงผลงาน: Univer Showcase และ
examples/ของรีโพซิโทรีนี้ - สเปรดชีตที่รองรับ AI:
dream-num/univer-mcp, การรวม Univer Platform / MCP สำหรับการขับเคลื่อน Univer Sheets ด้วยภาษาธรรมชาติ
📦 คู่มือรีโพซิโทรี
.
├── packages/ แพ็กเกจหลัก, เอ็นจิ้น, ประเภทเอกสาร, ปลั๊กอิน UI และปลั๊กอินคุณสมบัติ
├── examples/ ตัวอย่างเบราว์เซอร์และ Node.js ในเครื่องที่ใช้สำหรับการพัฒนา
├── common/ เครื่องมือภายในที่ใช้ร่วมกัน, ข้อมูลจำลอง, storybook และยูทิลิตี้
├── e2e/ การทดสอบ Playwright และการเปรียบเทียบภาพ
├── tests/ โปรเจกต์การทดสอบการรวมระบบเพิ่มเติม
└── docs/ บันทึกสถาปัตยกรรม, รูปภาพ และเอกสารประกอบเฉพาะรีโพซิโทรีไฟล์ README ระดับแพ็กเกจจะอยู่ข้างแพ็กเกจแต่ละรายการภายใต้ packages/
🧑💻 การพัฒนา
ข้อกำหนด:
- Node.js
>=22.18 - pnpm
>=10
git clone https://github.com/dream-num/univer.git
cd univer
pnpm install
pnpm devคำสั่งที่มีประโยชน์:
| คำสั่ง | วัตถุประสงค์ |
|---|---|
pnpm dev | เริ่มต้นแอปตัวอย่างในเครื่อง |
pnpm build | สร้างแพ็กเกจเวิร์กสเปซ โดยไม่รวมแพ็กเกจ common ภายใน |
pnpm test | รันการทดสอบหน่วยผ่าน Turbo |
pnpm typecheck | รันการตรวจสอบ TypeScript ผ่าน Turbo |
pnpm lint | รัน ESLint |
pnpm test:e2e | รันการทดสอบ Playwright |
pnpm storybook:dev | เริ่มต้น Storybook สำหรับการพัฒนาคอมโพเนนต์ UI |
โปรดอ่าน CONTRIBUTING.md ก่อนเปิด pull request
📝 หมายเหตุสำหรับผู้ร่วมพัฒนา
หมายเหตุเฉพาะ Repository ที่ควรอ่านก่อนทำการเปลี่ยนแปลงที่ลึกซึ้ง:
- Building Isomorphic Univer: วิธีการแยกตรรกะของเบราว์เซอร์, Node.js, UI และปลั๊กอินที่ใช้ร่วมกัน
- API Stability Policy: ความคาดหวังเกี่ยวกับ API ที่เสถียร, ทดลอง, ภายใน, เลิกใช้งาน และการเปลี่ยนแปลงที่ส่งผลกระทบ
- Contributing to Facade API: ความคาดหวังในการออกแบบ API สำหรับ
FUniver,FWorkbook,FRangeและคลาส Facade ที่เกี่ยวข้อง - Naming Convention: ข้อตกลงในการตั้งชื่อไฟล์, โฟลเดอร์, อินเทอร์เฟซ, ปลั๊กอิน, คำสั่ง และโทเค็นการฉีด Dependency
- Fixing Memory Leaks: รูปแบบการรั่วไหลที่พบบ่อยและขั้นตอนการดีบักสำหรับอินสแตนซ์ของ Univer
- Architecture TLDRs: บันทึกย่อกระชับสำหรับเอนจินสูตร, web worker, การอนุญาต, การเลือก และพฤติกรรมของ ref-range
💬 ชุมชน
- สอบถามคำถามได้ที่ GitHub Discussions
- พูดคุยกับชุมชนได้ที่ Discord
- ติดตาม Twitter / X และ YouTube
โปรดอ่าน Code of Conduct ก่อนเข้าร่วม
🔒 ความปลอดภัย
หากคุณเชื่อว่าพบปัญหาด้านความปลอดภัย โปรดปฏิบัติตาม Security Policy
❤️ ผู้สนับสนุน
Univer ได้รับการสนับสนุนจากชุมชนและผู้สนับสนุน คุณสามารถสนับสนุนโปรเจกต์ได้ผ่าน Open Collective
📄 ใบอนุญาต
ลิขสิทธิ์ (c) 2021-ปัจจุบัน DreamNum Co., Ltd.
ได้รับอนุญาตภายใต้ใบอนุญาต Apache-2.0
เอกสารโปรเจกต์
อ่านเอกสารต้นฉบับ
README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

- 💡 What is Univer?- [Open-source capabilities](#open-source-capabilities)
- 🚀 Build on the open-source foundation- [Quick start: an open-source spreadsheet editor](#quick-start) - [Connect your application to editable content](#connect-your-application-to-editable-content)
- 🏗️ Explore the open-source architecture- [Give custom features clear boundaries](#give-custom-features-clear-boundaries) - [Compose cross-feature edits and undo/redo](#compose-cross-feature-edits-and-undoredo) - [Connect applications and agents through Facade APIs and events](#connect-applications-and-agents-through-facade-apis-and-events)
- 🧩 Extend your application with Univer Office SDK- [Scope and licensing](#scope-and-licensing)
- 🌐 Application patterns and ecosystem- [Univer Workspace: an Office SDK reference application](#univer-workspace-an-office-sdk-reference-application) - [CLI, agent integrations, and developer skills](#cli-agent-integrations-and-developer-skills)
- 📚 Documentation and contributing- [Runtime compatibility](#runtime-compatibility)
- 💬 Community
- 🔒 Security
- ❤️ Sponsors
- 📄 License
💡 What is Univer?

Univer is an Office SDK for building Office applications inside your own product. It provides Office editing, calculation, collaboration, and file processing for people and existing agents, using your data and permissions. The product family covers spreadsheets, documents, presentations, relational tables, canvases, and PDFs.

Univer Office SDK has three parts:
- Web SDK is the foundation: content models, editing, rendering, formula calculation, and Facade APIs (application-facing APIs). Compose its plugins into an embedded editor or your own Office application, and reuse the content models, commands, and calculation for Headless processing without an interactive editor.
- Server SDK adds backend services for real-time collaboration, edit history, and Office file import and export.
- AI SDK connects Office capabilities to existing agents and workflows, with content tools, execution, and review integrations.
This repository provides the Web SDK's core architecture and engine implementations under Apache-2.0: content models and snapshot formats, plugin and dependency management, the command system, formula and rendering engines, Facade APIs, UI foundation, and Sheets and Docs editing capabilities. Commercial Web SDK plugins, Server SDK, and commercial AI SDK extensions are distributed and licensed separately.
Agents can use the same open-source APIs; your application supplies the model and tool orchestration. The quotation example demonstrates editing, calculation, and saving without an AI SDK dependency.
Open-source capabilities
Features are composed through plugins and presets; the quick start uses only the Sheets Core preset. Images use the corresponding drawing plugins. See the feature comparison for detailed open-source and commercial coverage.
The demos below showcase the wider Univer Office SDK, including commercial capabilities. They show more than the default open-source setup; see open source and commercial extensions for scope.








🚀 Build on the open-source foundation

Coordinate edits and undo/redo across features. Inserting a row inside a filter range changes both the base content and the filter range; undo needs to restore both. Each feature supplies its own changes and undo data, and the command composes their execution and history. The architecture walkthrough explains how to extend these editing workflows.
Quick start: an open-source spreadsheet editor
In a browser application using a bundler such as Vite:
pnpm add @univerjs/presets @univerjs/preset-sheets-coreCreate the container before initializing Univer:
<div id="app" style="height: 100vh"></div>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({})Your page now contains a spreadsheet editor. Use the returned univerAPI to work with its content. This example uses open-source packages and needs no commercial Univer license or Server SDK.
For component frameworks, retain the univer instance returned by createUniver and call univer.dispose() when the component unmounts. See the lifecycle guide.
Presets compose plugins and register their Facade APIs. For manual control, see the Plugin Mode example below. The installation guide covers both modes, peer dependencies, and framework integrations.
Keep coordinated @univerjs/* packages on the same version. Commercial packages must use the matching release line; independently released packages such as icons follow their declared compatibility. See the API Stability Policy.
Connect your application to editable content
Facade APIs are the application-facing interface to workbooks, worksheets, and ranges. Continue from the quick start to populate a quotation, update a quantity from application code, and read the recalculated total:
// Wait for formula controllers before editing a newly created workbook.
await new Promise<void>((resolve) => {
if (univerAPI.getCurrentLifecycleStage() >= univerAPI.Enum.LifecycleStages.Steady) {
resolve()
return
}
const listener = univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {
if (stage === univerAPI.Enum.LifecycleStages.Steady) {
listener.dispose()
resolve()
}
})
})
const workbook = univerAPI.getActiveWorkbook()!
const sheet = workbook.getActiveSheet()
sheet.getRange('A1:D4').setValues([
['Item', 'Quantity', 'Unit price', 'Amount'],
['Seats', 2, 25, '=B2*C2'],
['Support', 1, 100, '=B3*C3'],
['Total', '', '', '=SUM(D2:D3)'],
])
// An application control or agent can make the same edit.
sheet.getRange('B2').setValue(4)
univerAPI.getFormula().onCalculationResultApplied().then(() => {
console.log(sheet.getRange('D4').getValue()) // 200
localStorage.setItem('quotation', JSON.stringify(workbook.save()))
}).catch(console.error)The editor and your application operate on the same workbook; formula changes are recalculated automatically. workbook.save() returns a JSON snapshot containing the workbook and its registered plugin data. Your application owns persistence; this example uses browser storage. On a later page load, after initialization, restore the snapshot instead of creating a blank workbook:
const saved = localStorage.getItem('quotation')
if (saved) {
univerAPI.createWorkbook(JSON.parse(saved))
}This workflow uses only open-source packages. Snapshot persistence is separate from XLSX import and export, which uses the separately distributed file-conversion capabilities. Use public Facade APIs for application integration; the source links below explain internal implementation and extension points. See the API Stability Policy before depending on an extension point.
Use Plugin Mode when you need precise control over plugin selection, dependencies, or loading. The preset above handles this composition for you.
This alternative initialization uses the same app container and the Sheets Core preset's browser plugin stack without a Worker. Use it instead of the preset initialization, then run the same quotation example with the returned univerAPI.
pnpm add @univerjs/core @univerjs/design @univerjs/docs @univerjs/docs-ui \
@univerjs/engine-formula @univerjs/engine-render @univerjs/network \
@univerjs/sheets @univerjs/sheets-ui @univerjs/sheets-formula \
@univerjs/sheets-formula-ui @univerjs/sheets-numfmt \
@univerjs/sheets-numfmt-ui @univerjs/uiimport { 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 FormulaEnUS from '@univerjs/engine-formula/locale/en-US'
import { UniverRenderEnginePlugin } from '@univerjs/engine-render'
import { UniverNetworkPlugin } from '@univerjs/network'
import { UniverSheetsPlugin } from '@univerjs/sheets'
import SheetsEnUS from '@univerjs/sheets/locale/en-US'
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula'
import SheetsFormulaEnUS from '@univerjs/sheets-formula/locale/en-US'
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/network/facade'
import '@univerjs/docs/facade'
import '@univerjs/docs-ui/facade'
import '@univerjs/engine-formula/facade'
import '@univerjs/sheets/facade'
import '@univerjs/ui/facade'
import '@univerjs/sheets-ui/facade'
import '@univerjs/sheets-formula/facade'
import '@univerjs/sheets-numfmt/facade'
import '@univerjs/sheets-formula-ui/facade'
const univer = new Univer({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: mergeLocales(
DesignEnUS,
DocsUIEnUS,
FormulaEnUS,
SheetsEnUS,
SheetsFormulaEnUS,
SheetsFormulaUIEnUS,
SheetsNumfmtUIEnUS,
SheetsUIEnUS,
UIEnUS,
),
},
})
univer.registerPlugin(UniverNetworkPlugin)
univer.registerPlugin(UniverDocsPlugin)
univer.registerPlugin(UniverRenderEnginePlugin)
univer.registerPlugin(UniverUIPlugin, { container: 'app' })
univer.registerPlugin(UniverDocsUIPlugin)
univer.registerPlugin(UniverFormulaEnginePlugin)
univer.registerPlugin(UniverSheetsPlugin, {
onlyRegisterFormulaRelatedMutations: false,
})
univer.registerPlugin(UniverSheetsUIPlugin, {
protectedRangeShadow: true,
})
univer.registerPlugin(UniverSheetsNumfmtPlugin)
univer.registerPlugin(UniverSheetsNumfmtUIPlugin)
univer.registerPlugin(UniverSheetsFormulaPlugin)
univer.registerPlugin(UniverSheetsFormulaUIPlugin)
const univerAPI = FUniver.newAPI(univer)
univerAPI.createWorkbook({})The Docs plugins support spreadsheet rich-text editing. When adding a feature, include its corresponding Facade extensions, locale bundles, and UI styles. Dispose univer when its container is unmounted.
🏗️ Explore the open-source architecture

Give custom features clear boundaries
Univer organizes content logic and UI interaction in separate plugins. Feature plugins manage rules and content changes; UI plugins provide the interface and user interactions. For example, sheets-filter manages filter ranges and rules, while sheets-filter-ui provides panels, menus, and shortcuts.
%%{init: {'htmlLabels': false, 'theme': 'base', 'themeVariables': {'fontFamily': 'Arial, PingFang SC, Microsoft YaHei, sans-serif', 'fontSize': '17px', 'lineColor': '#64748b'}, 'flowchart': {'htmlLabels': false, 'curve': 'linear', 'nodeSpacing': 28, 'rankSpacing': 45, 'padding': 16, 'wrappingWidth': 270}}}%%
%% A layered overview, not a complete dependency graph.
%% Group arrows indicate reuse of the layer below; internal arrows show selected dependencies.
flowchart TD
subgraph FEATURES["Feature Plugins"]
direction LR
FUI["Filter<br/>UI Plugin"]
VUI["Data Validation<br/>UI Plugin"]
FILTER["Filter Plugin"]
VALIDATION["Data Validation Plugin"]
FUI --> FILTER
VUI --> VALIDATION
end
subgraph PRODUCTS["Product Plugins"]
direction LR
SUI["Sheets UI Plugin"]
SHEETS["Sheets Plugin"]
SUI --> SHEETS
end
subgraph FOUNDATION["Core Framework & Plugins"]
direction LR
UI["UI Plugin"]
FORMULA["Formula Engine Plugin"]
RENDER["Render Engine Plugin"]
CORE["Core"]
UI --> RENDER
RENDER --> CORE
FORMULA --> CORE
end
FEATURES --> PRODUCTS
PRODUCTS --> FOUNDATION
classDef logic fill:#eff6ff,color:#17365f,stroke:#93b4df,stroke-width:1.5px
classDef ui fill:#f0fdf4,color:#17543a,stroke:#91c8a7,stroke-width:1.5px
classDef shared fill:#f6f7f9,color:#334155,stroke:#bac3ce,stroke-width:1.5px
classDef feature fill:#172d50,color:#ffffff,stroke:#172d50
class FUI,VUI ui
class FILTER,VALIDATION logic
class SUI,SHEETS logic
class UI,FORMULA,RENDER,CORE shared
style FEATURES fill:#f7fcf9,stroke:#b5d8c1,color:#17543a
style PRODUCTS fill:#f5f9ff,stroke:#b6cbea,color:#17365f
style FOUNDATION fill:#fafbfc,stroke:#cbd2dc,color:#334155Figure 1: three plugin layers. Feature plugins build on product plugins, which reuse the core framework and plugins. Group arrows show dependencies on the layer below; Core provides content models, commands, dependency injection, and lifecycle management. Some plugins and dependencies are omitted.
New features keep their rules in their own plugins and cooperate through public services, commands, and defined extension points. UI plugins build on shared UI services and components.
Dependencies are explicit at two levels:
- Between plugins:
DependentOndeclares runtime plugin dependencies. The plugin service orders them, and lifecycle stages separate dependency registration, content initialization, and UI initialization. - Inside plugins: dependency injection connects controllers and services through declared dependencies. Supported overrides let an application replace an implementation, adapt a platform service, or supply a test double. Instance-scoped injectors keep application state separate between Univer instances.
Disposable registration also gives commands, listeners, components, and icons a cleanup path when their owner is disposed.
The filter plugin and its UI plugin show these boundaries in working code.
For filtering, sheets-filter owns content logic and sheets-filter-ui owns UI interaction. Each module has a focused responsibility.
%%{init: {'htmlLabels': false, 'theme': 'base', 'themeVariables': {'fontFamily': 'Arial, PingFang SC, Microsoft YaHei, sans-serif', 'fontSize': '17px', 'lineColor': '#64748b'}, 'flowchart': {'htmlLabels': false, 'curve': 'linear', 'nodeSpacing': 28, 'rankSpacing': 45, 'padding': 16, 'wrappingWidth': 270}}}%%
%% Every arrow means contains. This is code organization, not execution order.
flowchart LR
FEATURE["Filter Feature"]
LOGIC["Filter Plugin"]
UI["Filter UI Plugin"]
MODEL["Model"]
SERVICE["Service"]
CONTROLLER["Controller"]
COMMAND["Command / Mutation"]
FACADE["Facade API"]
VIEW["View"]
UICTRL["UI Controller"]
UISERVICE["UI Service"]
FEATURE --> LOGIC
FEATURE --> UI
LOGIC --> MODEL
LOGIC --> SERVICE
LOGIC --> CONTROLLER
LOGIC --> COMMAND
LOGIC --> FACADE
UI --> VIEW
UI --> UICTRL
UI --> UISERVICE
classDef logic fill:#eff6ff,color:#17365f,stroke:#93b4df,stroke-width:1.5px
classDef ui fill:#f0fdf4,color:#17543a,stroke:#91c8a7,stroke-width:1.5px
classDef shared fill:#f6f7f9,color:#334155,stroke:#bac3ce,stroke-width:1.5px
classDef feature fill:#172d50,color:#ffffff,stroke:#172d50
class FEATURE feature
class LOGIC,MODEL,SERVICE,CONTROLLER,COMMAND,FACADE logic
class UI,VIEW,UICTRL,UISERVICE uiFigure 2: code organization. Arrows mean “contains.” Both plugins can contain Controllers and Services: logic Controllers coordinate content changes and related features; UI Controllers connect menus, shortcuts, and interactions, with UI Services managing panel state. These responsibilities give new features a consistent structure to implement and test.
The UI foundation follows the same division. @univerjs/design supplies shared components and styles, @univerjs/ui provides workbench services such as menus, shortcuts, panels, and component registration, and @univerjs/icons supplies icons. A feature registers its components and icons, contributes menus, and attaches its rendering through these extension points. Teams can add a panel or toolbar feature while reusing the application's UI infrastructure. See the UI overview and the filter plugin's component and icon registration.
Compose cross-feature edits and undo/redo
For example, when rows are inserted inside a filter range, the filter plugin supplies the corresponding range change and its undo data. The row command composes the base edit and participating feature changes, executes them, and records their undo/redo information together. The row insertion feature can use the shared extension mechanism while the filter plugin owns its range-update rules.
The command system distinguishes three kinds of action:
- Command orchestrates a business action and the changes it requires.
- Mutation changes content saved in a snapshot, with serializable parameters.
- Operation changes transient state, such as an open panel or the scroll position.
A shared structure for undo/redo. For an undoable edit, the feature implementation supplies the forward mutations and corresponding inverse mutations, and the Command records them through IUndoRedoService. When one action affects several features, the Command can combine their changes and undo data in a single undo/redo record, so the user can undo and redo the complete action. See extending commands.
Features still need to cooperate. Interceptors and reference-range handlers give that cooperation a defined place. At supported extension points, plugins contribute checks or related mutations; interceptor priorities control ordering where the API defines it.
%%{init: {'htmlLabels': false, 'theme': 'base', 'themeVariables': {'fontFamily': 'Arial, PingFang SC, Microsoft YaHei, sans-serif', 'fontSize': '17px', 'lineColor': '#64748b'}, 'flowchart': {'htmlLabels': false, 'curve': 'linear', 'nodeSpacing': 28, 'rankSpacing': 45, 'padding': 16, 'wrappingWidth': 270}}}%%
%% Simplified insert-row example. A command composes mutations and records undo after success.
%% Events may also fire for nested command executions; not every callback is drawn.
flowchart TD
BEFORE["Before execution<br/>Inspect or cancel"]
CMD["Insert-row Command"]
BASE["Row mutations"]
EXT["Feature extension points<br/>Filter range changes"]
MODEL["Execute combined mutations"]
UNDO["Record undo and redo"]
AFTER["After execution<br/>Notify listeners"]
BEFORE --> CMD
CMD --> BASE
CMD --> EXT
BASE --> MODEL
EXT --> MODEL
MODEL --> UNDO
UNDO --> AFTER
classDef entry fill:#f6f7f9,color:#334155,stroke:#bac3ce,stroke-width:1.5px
classDef core fill:#eff6ff,color:#17365f,stroke:#93b4df,stroke-width:1.5px
classDef extension fill:#f0fdf4,color:#17543a,stroke:#91c8a7,stroke-width:1.5px
class BEFORE,AFTER entry
class CMD,BASE,MODEL,UNDO core
class EXT extensionThis diagram simplifies an insert-row workflow. Nested command executions have their own callbacks; it does not show every event or the separate Operation path. See the row command, filter controller, and interceptor service.
These boundaries support a practical testing strategy: test models and services independently, replace external dependencies through DI, and add regression cases for combined actions and undo/redo. The filter controller tests exercise row and column changes and their effect on filtering.
Connect applications and agents through Facade APIs and events
The repository includes the content models, formula engine, and Canvas rendering and layout engine behind the editors. They are shared building blocks: spreadsheet rich text, for example, reuses document layout and rendering. Custom features can build on these engines instead of implementing a separate content stack. Read about the formula engine architecture and rendering engine architecture.
Browser editors, Node.js Headless tasks, and appropriately composed Workers can reuse the corresponding content plugins, models, commands, and calculation. See Headless Univer and the isomorphic architecture.
ICommandService exposes execution callbacks so plugins can observe commands before and after execution. Facade APIs wrap the underlying capabilities in application objects such as FWorkbook, FWorksheet, and FRange.
Each plugin contributes its own Facade extensions, typed events through univerAPI.Event, and enums through univerAPI.Enum. Application code can discover event names and constants from one entry point instead of importing private services or repeating strings. For example, BeforeCommandExecute can inspect and cancel an execution; CommandExecuted reports executions to listeners. Listeners return disposables, and cancellation applies where the event supports it.
Facade extensions stay with their feature packages, so a content API does not have to pull in unrelated UI APIs. See the Facade design, command callbacks and event bridge, and Enum entry point.
The repository provides working feature implementations and patterns for extending them. Read the filter implementation walkthrough for a complete example, or the API Stability Policy before depending on an extension point.
🧩 Extend your application with Univer Office SDK

When you want more ready-to-integrate capabilities, compose the corresponding Univer Office SDK modules: additional content types, advanced editing plugins, collaboration, file conversion, and agent tooling. They extend the same content models, plugin architecture, command system, and Facade design introduced above, so you can build on your existing integration.
Scope and licensing
- This repository: Apache-2.0 packages that can be used in commercial applications under that license, including the open-source Headless content capabilities.
- Commercial extensions: Commercial Web SDK plugins, Server SDK, and AI SDK capabilities beyond the open-source foundation are distributed and licensed separately. Freemium evaluation includes watermarks and feature limits.
- Reference applications: Open-source applications such as Univer Workspace have their own source licenses. Their SDK dependencies retain their respective licenses.
See the feature comparison, including its Open source only filter, for detailed coverage and plans and licensing for commercial options.
These capabilities operate on serializable Unit snapshots, including Sheets' IWorkbookData, Docs' IDocumentData, Slides' ISlideData, and canvases' IBoardData (called Boards in the API). These types come from core and the respective product packages; current Slides and Boards capabilities are separately distributed commercial products. The shared Unit conventions let browser editors, backend services, and agents work with the same content.
Commands orchestrate edits; Mutations describe content changes. Collaboration packages those mutations into changesets, applies operational transformation (OT) to concurrent changes, and manages confirmed revisions and snapshots. History can reconstruct a revision from a snapshot and subsequent changesets. Read the collaboration design and Collaboration SDK overview.
Exchange maps Office file structures to and from Univer content snapshots. For OOXML formats such as XLSX, DOCX, and PPTX, it parses the file into the corresponding Sheet, Doc, or Slide data and generates the file representation on export. The converted content can enter the same editing, calculation, collaboration, and agent workflows. See Office file import and export.
AI SDK builds on the Web SDK's Headless content models, commands, calculation, and Facade APIs. It exposes structured TypeScript APIs and optional Commander presets that applications can compose into their own Office CLI or agent tools.
- Understand, discover, and edit. Inspection returns structured content. API Reference helps the agent find Facade symbols and signatures shipped with its SDK. Facade execution distinguishes read and write modes, captures mutations, and works with explicit synchronization and commit results. See content operations.
- Check the rendered result. A browser Render Runtime reuses Web SDK rendering for screenshots. Slide layout lint adds structured findings for issues such as off-page or overlapping text, giving the agent evidence for another editing pass. See visual inspection.
- Edit drafts for human review. With the corresponding collaboration and Web capabilities, agents can edit and verify an isolated Worktree draft over several rounds, then hand it to a person to review, merge, or reopen. The workflow uses the same snapshots, mutations, and revision conventions. See Worktree.
For repeated calls, optional Worker pools and a daemon reuse loaded content instances and reduce repeated initialization. Your application owns the root CLI, targets, authorization, and output. Explore the AI SDK package catalog to select the required capabilities.
🌐 Application patterns and ecosystem

Univer Workspace: an Office SDK reference application
For a complete application reference, start with Univer Workspace. It shows how to compose Univer Office SDK editors, collaboration, file capabilities, existing agents, and human review into a self-hostable workspace. Follow its integration patterns when building your own Office application or agent workspace.


Workspace is open source; its SDK dependencies follow their respective licenses. See the Workspace overview for connected apps and review workflows.

CLI, agent integrations, and developer skills
The same SDK capabilities can also be composed into the agents and tools you already use:
Each repository documents its setup and SDK dependencies. Explore the ecosystem for agent entry points, or the documentation to build your own integration.
📚 Documentation and contributing
Thanks to all contributors who build and improve Univer. Contributions to engines, plugins, tests, documentation, and examples are welcome.





Runtime compatibility
- Polyfills: Univer relies on
Intl.Segmenter. Add a polyfill such as@formatjs/intl-segmenterif 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
exportsfield inpackage.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.
Repository layout
.
├── packages/ Core packages, engines, document types, UI plugins, and feature plugins
├── examples/ All-in-one Vite workbench used for local browser development
├── common/ Shared internal tooling, storybook, and utilities
├── tests/ Additional integration test projects
└── docs/ Architecture notes, images, and repository-local documentationPackage-level READMEs live beside each package under packages/.
Local development
Requirements:
- Node.js
>=22.18 - pnpm: use the version declared by
packageManagerinpackage.json.
git clone https://github.com/dream-num/univer.git
cd univer
pnpm install
pnpm devUseful commands:
Read CONTRIBUTING.md before opening a pull request.
- Repository packages, presets, and examples.
- Building Isomorphic Univer.
- Contributing to Facade API.
- API Stability Policy.
- Naming Convention and Fixing Memory Leaks.
- Architecture TLDRs and OLE attachment notes.
💬 Community
Ask questions in GitHub Discussions, join Discord, and follow X or YouTube. Please read the Code of Conduct.
🔒 Security
If you believe you have found a security issue, please follow the Security Policy.
❤️ Sponsors
Univer is supported by the community and sponsors. You can support the project through Open Collective.
📄 License
Copyright (c) 2021-present DreamNum Co., Ltd.
The open-source packages in this repository are licensed under Apache-2.0. Commercial SDK modules are distributed and licensed separately.
