下面是设置单元格背景色为红色:
const xs = new Spreadsheet("#x-spreadsheet-demo") .loadData({}) // load data .change(data => { // save data to db }); var bgcolor_ix=xs.datas[0].addStyle({"bgcolor":"#fe0000"}); var errcell=xs.datas[0].getCell(1,4); errcell.style=bgcolor_ix; xs.reRender();
const xs = new Spreadsheet("#x-spreadsheet-demo")
.loadData({}) // load data
.change(data => {
// save data to db
});
var bgcolor_ix=xs.datas[0].addStyle({"bgcolor":"#fe0000"});
var errcell=xs.datas[0].getCell(1,4);
errcell.style=bgcolor_ix;
xs.reRender();