Skip to content

nusr/excel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3dc4cf6 · Apr 25, 2025
Feb 9, 2025
Jan 27, 2025
Apr 23, 2025
Jan 27, 2025
Feb 21, 2025
Apr 25, 2025
May 9, 2024
Jan 17, 2025
May 9, 2024
Jan 27, 2025
Dec 19, 2020
Feb 6, 2025
Feb 9, 2025
Feb 11, 2025
Dec 13, 2024
Feb 9, 2025
Feb 14, 2025
Apr 21, 2025
Mar 4, 2025
Feb 14, 2025

Repository files navigation

Online Collaboration Excel

CI codecov GitHub GitHub code size in bytes

English | 中文

Online Demo

Demo

Installation

npm i --save excel-collab

Quick Start

  1. Create a React app
npm create vite@latest my-app -- --template react-ts
cd my-app
npm i
  1. Install the Required Libraries
npm i --save excel-collab yjs
  1. Modify the Main File
// src/main.tsx
import { createRoot } from 'react-dom/client';
import { StrictMode } from 'react';
import { initController, StateContext, Excel } from 'excel-collab';
import Worker from 'excel-collab/worker?worker';
import 'excel-collab/style.css';
import * as Y from 'yjs';

const controller = initController({
  worker: new Worker(),
  doc: new Y.Doc(),
});

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <div style={{ height: '100vh' }}>
      <StateContext value={{ controller }}>
        <Excel />
      </StateContext>
    </div>
  </StrictMode>,
);
  1. Start the app
npm run dev

Examples

Collaboration Example

git clone https://github.com/nusr/excel.git
cd excel

npm i -g pnpm
pnpm i

cd demo/frontend && pnpm i && cd -
cd demo/backend && pnpm i && cd -
npm run dev

Supported Features

  • Online Collaboration
  • Create File
  • Change File Name
  • Web Worker parse formulas
  • OffScreenCanvas Render
  • Undo
  • Redo
  • Copy
  • Cut
  • Paste
  • Formulas
  • Font Family
  • Font Size
  • Font Color
  • Fill Color
  • Bold
  • Italic
  • Strike
  • Underline
  • Border
  • Text Vertical Align
  • Text Horizontal Align
  • Text Wrapping
  • Number Format
  • AutoFilter
  • Merge Cells
  • Chart
  • Floating Picture
  • Define Name
  • Insert Row
  • Insert Column
  • Delete Row
  • Delete Column
  • Hide Row
  • Hide Column
  • Row Height
  • Column Width
  • Insert Sheet
  • Delete Sheet
  • Rename Sheet
  • Hide Sheet
  • Unhide Sheet
  • Import XLSX
  • Export XLSX
  • Import CSV
  • Export CSV
  • Dark Mode
  • I18N

Supported Formulas

Math

  • ABS
  • ACOS
  • ACOSH
  • ACOT
  • ACOTH
  • ASIN
  • ASINH
  • ATAN
  • ATAN2
  • ATANH
  • AVERAGE
  • COS
  • COT
  • EXP
  • INT
  • PI
  • SIN
  • SUM

Text

  • CHAR
  • CODE
  • CONCAT
  • CONCATENATE
  • LEN
  • LOWER
  • SPLIT
  • T
  • TEXT
  • TRIM
  • UNICHAR
  • UNICODE
  • UPPER