กลับไปหน้า Tools

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

รูปแบบ

Library / SDK

เหมาะกับงาน

เอกสารและความรู้

เหมาะกับอาชีพ

Ecosystem

TypeScript

แปลและเรียบเรียงโดย AI

เนื้อหาฉบับภาษาไทย

ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง

SDK สำหรับสำนักงานแบบฟูลสแตกและไอโซมอร์ฟิก สำหรับสร้างสเปรดชีต เอกสาร และงานนำเสนอ

สร้างประสบการณ์การทำงานที่มีประสิทธิภาพที่สามารถฝังได้ ด้วยสถาปัตยกรรมปลั๊กอิน การเรนเดอร์แบบ Canvas เอ็นจินสูตรคำนวณ และ Facade API เดียวที่ทำงานได้ทั้งในเบราว์เซอร์และบน Node.js

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

📖 เอกสารประกอบ | ✨ ตัวอย่างผลงาน | 📘 เอกสารอ้างอิง API | 📝 บล็อก

Release License Build CodeFactor Codecov

Stars Contributors Issues Last Commit

Discord Twitter Open Collective

Trendshift

✨ 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 และสไตล์ที่จำเป็น

bash
pnpm add @univerjs/presets @univerjs/preset-sheets-core
ts
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 ช่วยให้คุณควบคุมแพ็กเกจ, การนำเข้าสไตล์, การรวมภาษา, การลงทะเบียน Facade API และลำดับปลั๊กอินได้ในระดับที่ต่ำกว่า

bash
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
ts
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 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({})

หน้าของคุณต้องมีคอนเทนเนอร์:

html
<div id="app" style="height: 100vh"></div>

เรียนรู้เพิ่มเติมใน คู่มือการติดตั้งและการใช้งานพื้นฐาน, การอ้างอิง createUniver และการอ้างอิง Facade API

🧩 โหมดพรีเซ็ต vs โหมดปลั๊กอิน

เลือกใช้เมื่อไหร่เริ่มต้นที่นี่
โหมดพรีเซ็ตคุณต้องการ Sheets, Docs หรือ Node ที่ทำงานได้โดยมีการกำหนดค่าน้อยที่สุดuniver-presets และ คู่มือเริ่มต้นใช้งาน
โหมดปลั๊กอินคุณต้องการการควบคุมที่เข้มงวดเกี่ยวกับแพ็กเกจ, ลำดับการลงทะเบียนปลั๊กอิน, การโหลดแบบ Lazy Loading หรือการจัดองค์ประกอบรันไทม์แบบกำหนดเองexamples/ ของรีโพซิโทรีนี้ และ คู่มือสถาปัตยกรรม
โหมด Headlessคุณต้องการการประมวลผลเวิร์กบุ๊ก/เอกสารฝั่งเซิร์ฟเวอร์, การคำนวณสูตร หรือระบบอัตโนมัติที่ไม่มี UIHeadless 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, การมอบหมายการประมวลผล, การคำนวณฝั่งเซิร์ฟเวอร์ และเครื่องมือเล่นซ้ำการเปลี่ยนแปลง
IntegrationsReact, 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 ด้วยภาษาธรรมชาติ

📦 คู่มือรีโพซิโทรี

text
.
├── packages/      แพ็กเกจหลัก, เอ็นจิ้น, ประเภทเอกสาร, ปลั๊กอิน UI และปลั๊กอินคุณสมบัติ
├── examples/      ตัวอย่างเบราว์เซอร์และ Node.js ในเครื่องที่ใช้สำหรับการพัฒนา
├── common/        เครื่องมือภายในที่ใช้ร่วมกัน, ข้อมูลจำลอง, storybook และยูทิลิตี้
├── e2e/           การทดสอบ Playwright และการเปรียบเทียบภาพ
├── tests/         โปรเจกต์การทดสอบการรวมระบบเพิ่มเติม
└── docs/          บันทึกสถาปัตยกรรม, รูปภาพ และเอกสารประกอบเฉพาะรีโพซิโทรี

ไฟล์ README ระดับแพ็กเกจจะอยู่ข้างแพ็กเกจแต่ละรายการภายใต้ packages/

🧑‍💻 การพัฒนา

ข้อกำหนด:

  • Node.js >=22.18
  • pnpm >=10
bash
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

💬 ชุมชน

โปรดอ่าน Code of Conduct ก่อนเข้าร่วม

🔒 ความปลอดภัย

หากคุณเชื่อว่าพบปัญหาด้านความปลอดภัย โปรดปฏิบัติตาม Security Policy

❤️ ผู้สนับสนุน

Univer ได้รับการสนับสนุนจากชุมชนและผู้สนับสนุน คุณสามารถสนับสนุนโปรเจกต์ได้ผ่าน Open Collective

Sponsor 0 Sponsor 1 Sponsor 2 Sponsor 3 Sponsor 4 Sponsor 5 Sponsor 6

Backer 0 Backer 1 Backer 2 Backer 3 Backer 4 Backer 5 Backer 6

📄 ใบอนุญาต

ลิขสิทธิ์ (c) 2021-ปัจจุบัน DreamNum Co., Ltd.

ได้รับอนุญาตภายใต้ใบอนุญาต Apache-2.0

เอกสารโปรเจกต์

อ่านเอกสารต้นฉบับ

README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

ดูไฟล์บน GitHub
Univer

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

🚀 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.

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

bash
pnpm add @univerjs/presets @univerjs/preset-sheets-core
ts
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 gives you lower-level control over packages, style imports, locale merging, Facade API registration, and plugin order.

bash
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
ts
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 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:

html
<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

ChooseWhen to use itStart here
Preset ModeYou want a working Sheets, Docs, or Node setup with minimal configuration.univer-presets and the getting started guide
Plugin ModeYou need strict control over packages, plugin registration order, lazy loading, or custom runtime composition.This repository's examples/ and architecture guide
Headless ModeYou 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-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

AreaOpen-source capabilitiesUniver Pro extensions
SheetsWorkbooks, 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.
DocsRich 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.
SlidesPresentation 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.
BasesBuild 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.
RuntimeBrowser 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.
IntegrationsReact, 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.

CategoryOpen sourceUniver Pro / commercial
FoundationCore SDK, plugin system, rendering engine, formula engine, Facade API, themes, i18n, and framework adapters.Pro presets and enterprise deployment packages.
SheetsCore 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.
DocsDocument 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.
SlidesOSS presentation model and UI packages.Pro slide model/UI packages, slide import/export, charts, tables, and reusable shape editor UI.
BasesExtensible 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 runtimeNode.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

📦 Repository Guide

text
.
├── 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 documentation

Package-level READMEs live beside each package under packages/.

🧑‍💻 Development

Requirements:

  • Node.js >=22.18
  • pnpm >=10
bash
git clone https://github.com/dream-num/univer.git
cd univer
pnpm install
pnpm dev

Useful commands:

CommandPurpose
pnpm devStart the local examples app.
pnpm buildBuild workspace packages, excluding internal common packages.
pnpm testRun unit tests through Turbo.
pnpm typecheckRun TypeScript checks through Turbo.
pnpm lintRun ESLint.
pnpm test:e2eRun Playwright tests.
pnpm storybook:devStart Storybook for UI component development.

Read CONTRIBUTING.md before opening a pull request.

📝 Contributor Notes

Repository-local notes worth reading before deeper changes:

💬 Community

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.

Sponsor 0 Sponsor 1 Sponsor 2 Sponsor 3 Sponsor 4 Sponsor 5 Sponsor 6

Backer 0 Backer 1 Backer 2 Backer 3 Backer 4 Backer 5 Backer 6

📄 License

Copyright (c) 2021-present DreamNum Co., Ltd.

Licensed under the Apache-2.0 license.

#collaboration#data-table#doc#docx#excel#grid#live-share#ppt#pptx#presentation#sdk#sheet