let yourElement = document.getElementById("yourElement");
let wsheet = new websheet('HTML', yourElement,0,0,800,400);
let workbook = wsheet.Workbook();
wsheet.$on("SheetChange", function (activeName) {
console.log("SheetChange:" + activeName)
});
wsheet.$on("ActiveCellChange", function (sheetname, activeRange, oldactiveRange) {
console.log("ActiveCellChange:" + sheetname + ' ' + activeRange + ' ' + oldactiveRange);
});
wsheet.$on("CellValueChage", function (activesheet, cell) {
console.log("CellValueChage:" + activesheet.name + ' ' + cell.r + ' ' + cell.v);
});
wsheet.$on("RowChange", function (activesheet, type, sheetname, start, num) {
//type I 新增,D删除
console.log("RowChange:" + type + ' ' + sheetname + ' ' + start + ' ' + num)
});
wsheet.$on("ColChange", function (activesheet, type, sheetname, start, num) {
//type I 新增,D删除
console.log("ColChange:" + type + ' ' + sheetname + ' ' + start + ' ' + num)
});
wsheet.BuildSheet();
wsheet.Draw();