https://github.com/nusr/excel
Online Spreadsheet Editor
https://github.com/nusr/excel
excel react spreadsheet xlsx
Last synced: 26 days ago
JSON representation
Online Spreadsheet Editor
- Host: GitHub
- URL: https://github.com/nusr/excel
- Owner: nusr
- License: mit
- Created: 2020-12-19T15:44:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T06:21:28.000Z (about 1 year ago)
- Last Synced: 2024-04-21T17:20:11.563Z (about 1 year ago)
- Topics: excel, react, spreadsheet, xlsx
- Language: TypeScript
- Homepage: https://nusr.github.io/excel
- Size: 14.5 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Online Collaboration Excel
[](https://github.com/nusr/excel/actions/workflows/main.yml)
[](https://codecov.io/gh/nusr/excel)

English | [中文](./README_zh.md)
[Online Demo](https://nusr.github.io/excel)

## Installation
```bash
npm i --save excel-collab
```## Quick Start
1. Create a React app
```bash
npm create vite@latest my-app -- --template react-ts
cd my-app
npm i
```2. Install the Required Libraries
```bash
npm i --save excel-collab yjs
```3. Modify the Main File
```ts src/main.tsx
// 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(
,
);
```4. Start the app
```bash
npm run dev
```## Examples
- [Simple Example](https://stackblitz.com/edit/nusr-excel-simple)
- [Custom Example](https://stackblitz.com/edit/nusr-excel-custom)## Collaboration Example
```bash
git clone https://github.com/nusr/excel.git
cd excelnpm i -g pnpm
pnpm icd demo/frontend && pnpm i && cd -
cd demo/backend && pnpm i && cd -
npm run dev
```## Supported Features
- [x] Online Collaboration
- [x] Create File
- [x] Change File Name
- [x] Web Worker parse formulas
- [x] OffScreenCanvas Render
- [x] Undo
- [x] Redo
- [x] Copy
- [x] Cut
- [x] Paste
- [x] Formulas
- [x] Font Family
- [x] Font Size
- [x] Font Color
- [x] Fill Color
- [x] Bold
- [x] Italic
- [x] Strike
- [x] Underline
- [x] Border
- [x] Text Vertical Align
- [x] Text Horizontal Align
- [x] Text Wrapping
- [x] Number Format
- [x] AutoFilter
- [x] Merge Cells
- [x] Chart
- [x] Floating Picture
- [x] Define Name
- [x] Insert Row
- [x] Insert Column
- [x] Delete Row
- [x] Delete Column
- [x] Hide Row
- [x] Hide Column
- [x] Row Height
- [x] Column Width
- [x] Insert Sheet
- [x] Delete Sheet
- [x] Rename Sheet
- [x] Hide Sheet
- [x] Unhide Sheet
- [x] Import XLSX
- [x] Export XLSX
- [x] Import CSV
- [x] Export CSV
- [x] Dark Mode
- [x] I18N## Supported Formulas
### Math
- [x] ABS
- [x] ACOS
- [x] ACOSH
- [x] ACOT
- [x] ACOTH
- [x] ASIN
- [x] ASINH
- [x] ATAN
- [x] ATAN2
- [x] ATANH
- [x] AVERAGE
- [x] COS
- [x] COT
- [x] EXP
- [x] INT
- [x] PI
- [x] SIN
- [x] SUM### Text
- [x] CHAR
- [x] CODE
- [x] CONCAT
- [x] CONCATENATE
- [x] LEN
- [x] LOWER
- [x] SPLIT
- [x] T
- [x] TEXT
- [x] TRIM
- [x] UNICHAR
- [x] UNICODE
- [x] UPPER