- using Canvas to draw Excel tables, supporting some basic table operation functions, and supporting copying and pasting data with Alibaba in Excel documents and WPS
npm i e-sheet
// es
import eSheet from 'e-sheet'
import 'e-sheet/dist/css/index.css'
const excel = new eSheet('#elt',{
width:1200,
height:800
})
// umd
<link rel="stylesheet" href="dist/css/index.css">
<script lang="javascript" src="dist/e-sheet.umd.js"></script>
const excel = new eSheet('#elt',{
width:1200,
height:800
})
cd ./server/multi-person-collaboration
cargo run
function name | ability | param | example |
---|---|---|---|
exportXlsxData | export | none | [{label:"sheet1",sheet:{!ref:"D10",D10:{t:"s",v:"test content"}}}] |
stepCallbackHandle | step callback | callback | excel.stepCallbackHandle((obj)=>{console.log(obj)) |
fresh | fresh all | none | void |
freshContent | fresh content | none | void |
connectWebSocket | connnect websocket | addr | ws://192.168.31.208:8091 |
drawExcel | import data | books | [{"id":1703748720496,"label":"Sheet1","sheet":[{"row":1,"col":1,"text":"","textAsNumber":null,"width":120,"height":40,"x":0,"y":0,"ltX":40,"ltY":40,"mergeWidth":0,"mergeHeight":0,"mergeRow":1,"mergeCol":1,"mergeStartLabel":"","mergeEndLabel":"","mergeLabelGroup":[],"isMerge":false,"bgColor":"#ffffff","fontColor":"#000000","font":null,"fontSize":12,"fontWeight":"","fontItalic":"","fontFamily":"Calibre","textAlign":"center","textBaseline":"middle","strikethrough":"","underline":"","label":"A1"}]}] |
- single choice
- multiple choice
- copy
- paste
- painter
- merge
- split
- drag
- add row
- add col
- font-family
- font-color
- background-color
- horizontal-alignment
- vertical-alignment
- strikethrough
- underline
- export-data
- import-data
- forward
- fallback