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 ต้นฉบับ

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
✨ 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
🚀 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-presetswhen 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.
Presets are curated collections of Univer plugins that include the required Facade API registrations and styles.
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 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/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({})Your page needs a container:
<div id="app" style="height: 100vh"></div>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.
For API compatibility expectations, experimental APIs, internal APIs, and deprecation rules, see the API Stability Policy.
🧭 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-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.
🛠️ What You Can Build
| Area | Open-source capabilities | Univer Pro extensions |
|---|---|---|
| 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. | Real-time collaboration, edit history, import/export, printing, charts, pivot tables, sparklines, outlines, shapes, in-cell graphics, data connectors, server-side calculation, and performance-enhanced formula features. |
| Docs | Rich document model, editing UI, lists, hyperlinks, drawing integration, comments, quick insert, and shared document architecture. | Collaboration, import/export, printing, enhanced tables and lists, columns, callouts, code blocks, quotes, shapes, and remote comment resources. |
| Slides | Presentation data model and UI packages under active development. | Pro slide model and UI, slide import/export, chart and table model/UI plugins, and shared shape-editing infrastructure. |
| Bases | Build custom structured-data experiences on top of Univer's plugin, command, and model architecture. | Base database model, commands, formula integration, workbench UI, field editors, and render-engine views. |
| Runtime | Browser apps, Node.js headless usage, Web Worker/RPC patterns, multi-instance usage, and server-oriented automation. | Collaboration client/server packages, Node.js collaboration client, Pro server services, SSR, computing delegation, server-side calculation, and changeset replay tooling. |
| Integrations | React, Vue, Web Components, framework templates, theming, localization, and custom plugins. | Pro presets and enterprise deployment packages. |
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. Univer Pro is developed separately as a commercial extension layer for advanced product surfaces, collaboration, server features, and enterprise integrations.
| Category | Open source | Univer Pro / commercial |
|---|---|---|
| Foundation | Core SDK, plugin system, rendering engine, formula engine, Facade API, themes, i18n, and framework adapters. | Pro presets and enterprise deployment packages. |
| Sheets | Core spreadsheet editing, formulas, number formatting, filter/sort, data validation, conditional formatting, notes, tables, hyperlinks, comments, drawing, find and replace. | Collaboration, edit history, import/export, print, charts, pivot tables, sparklines, outlines, shapes, in-cell graphics, data connectors, range preprocessing, and enhanced formula engine features. |
| Docs | Document model and editor UI, lists, hyperlinks, comments, quick insert, and drawing integration. | Collaboration, import/export, print, enhanced tables/lists, columns, callouts, code blocks, quotes, shapes, and remote thread-comment resources. |
| Slides | OSS presentation model and UI packages. | Pro slide model/UI packages, slide import/export, charts, tables, and reusable shape editor UI. |
| Bases | Extensible plugin architecture for custom data-centric products. | Base database core model, commands, mutations, formula integration, workbench UI, field editors, and render-engine integration. |
| Server and runtime | Node.js headless runtime, RPC/Web Worker patterns, and server-oriented automation primitives. | Collaboration server, Node.js collaboration client, SSR services, computing delegation, server-side calculation, and collaboration changeset replay tooling. |
Pro features are documented in the Univer Pro guide. They are intentionally separated here so the OSS package surface is clear.
Boundary principles:
- OSS packages in this repository are intended to be useful on their own under the Apache-2.0 license. Univer Pro is optional and is not required to use the public OSS SDK APIs.
- Bugs, regressions, and security issues in OSS packages should be reported and fixed in the OSS repository, even when a related Pro feature exists.
- OSS documentation should not imply that Pro-only capabilities are available in public
@univerjs/*packages. Pro-only APIs, packages, and deployment paths should be named explicitly. - When an OSS feature has a Pro enhancement, the OSS behavior should remain documented independently so users can evaluate the open-source surface without reading commercial docs first.
🌐 Ecosystem
- Core SDK:
dream-num/univer, this monorepo. - Presets:
dream-num/univer-presets, curated plugin bundles for browser and Node.js apps. - AI agent skills:
dream-num/univer-sdk-skills, reusable instructions for AI agents working with Univer integration, Pro features, plugin development, and Node backends. See the AI Skills guide. - Documentation: docs.univer.ai, including Sheets, Docs, Slides, recipes, and Pro guides.
- API Reference: docs.univer.ai/reference, the Facade API and generated API reference.
- Examples and showcase: Univer Showcase and this repository's
examples/. - AI-native spreadsheets:
dream-num/univer-mcp, Univer Platform / MCP integration for driving Univer Sheets with natural language.
📦 Repository Guide
.
├── packages/ Core packages, engines, document types, UI plugins, and feature plugins
├── examples/ Local browser and Node.js demos used for development
├── common/ Shared internal tooling, mock data, storybook, and utilities
├── e2e/ Playwright and visual comparison tests
├── tests/ Additional integration test projects
└── docs/ Architecture notes, images, and repository-local documentationPackage-level READMEs live beside each package under packages/.
🧑💻 Development
Requirements:
- Node.js
>=22.18 - pnpm
>=10
git clone https://github.com/dream-num/univer.git
cd univer
pnpm install
pnpm devUseful commands:
| Command | Purpose |
|---|---|
pnpm dev | Start the local examples app. |
pnpm build | Build workspace packages, excluding internal common packages. |
pnpm test | Run unit tests through Turbo. |
pnpm typecheck | Run TypeScript checks through Turbo. |
pnpm lint | Run ESLint. |
pnpm test:e2e | Run Playwright tests. |
pnpm storybook:dev | Start Storybook for UI component development. |
Read CONTRIBUTING.md before opening a pull request.
📝 Contributor Notes
Repository-local notes worth reading before deeper changes:
- Building Isomorphic Univer: how to split browser, Node.js, UI, and shared plugin logic.
- API Stability Policy: stable, experimental, internal, deprecated, and breaking-change expectations.
- Contributing to Facade API: API design expectations for
FUniver,FWorkbook,FRange, and related Facade classes. - Naming Convention: file, folder, interface, plugin, command, and dependency injection token conventions.
- Fixing Memory Leaks: common leak patterns and debugging workflow for Univer instances.
- Architecture TLDRs: concise notes for formula engine, web worker, permission, selection, and ref-range behavior.
💬 Community
- Ask questions in GitHub Discussions.
- Chat with the community on Discord.
- Follow Twitter / X and YouTube.
Please read the Code of Conduct before participating.
🔒 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.
Licensed under the Apache-2.0 license.
