Skip to content

nusr/excel

Repository files navigation

Online Collaboration Excel

CI codecov GitHub GitHub code size in bytes

online demo

demo

Installation

npm i --save excel-collab

Examples

Simple Example

Custom Example

Collaboration Example

Developing

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

npm i -g pnpm
pnpm i
npm run start

Environment

Create an .env file and modify it as the .env.example file

Key Required Description
VITE_SUPABASE_URL optional Supbase url
VITE_SUPABASE_ANON_KEY optional Supbase anon key
VITE_DEFAULT_EXCEL_ID optional default excel uuid

Supbase

Collaborative editing uses Supabase as backend. You need to configure VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY. With Row Level Security (RLS) disabled, anonymous users will be able to read/write data in the table.

CREATE TABLE IF NOT EXISTS history (
  id SERIAL PRIMARY KEY,
  doc_id UUID,
  update TEXT,
  create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
);

-- document table need to enable real time
CREATE TABLE IF NOT EXISTS document (
  id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
  name VARCHAR(20),
  create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
);

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