Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 2.98 KB

README.md

File metadata and controls

102 lines (73 loc) · 2.98 KB

e-sheet

e-sheet

web excel

English   简体中文  

introduction

  • 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

example

preview

https://lyqgit.github.io

install


npm i e-sheet

use


// 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
})

collaborative services


cd ./server/multi-person-collaboration

cargo run

api

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"}]}]

function

  • 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