本帖最后由 dzf 于 2016-3-24 14:16 编辑
下面这段代码,我把setIsProtected设成false就全表都能编辑,setIsProtected(true)就全表不能编辑,style无效,为什么呢?
增加了 sheet.getRow(19).locked(false);第20行还是不能编辑。
sheet.setIsProtected(true);
var cstyle1 = sheet.getDefaultStyle(GcSpread.Sheets.SheetArea.viewport);
cstyle1.locked = true;
cstyle1.backColor="gray";
var cstyle2 = new GcSpread.Sheets.Style();
cstyle2.locked = false;
cstyle2.backColor = "lightGreen";
sheet.setStyle(19, -1, cstyle2); |
|