10金币
上图里的所有边框,我改怎么清除?
我代码里是这么写的,但是没有效果,望指点:
let GC = window.GC;
var lineBorder = new GC.Spread.Sheets.LineBorder(this.selectedColor, this.selectedBorderLine);
var sheetArea = GC.Spread.Sheets.SheetArea.viewport;let sheet = this.ctrlSpread.getActiveSheet();let selections = this.ctrlSpread.getActiveSheet().getSelections();let selection = selections[0];
let rowCount = selection.rowCount;
let colCount = selection.colCount;
let range = sheet.getRange(selection.row, selection.col, rowCount, colCount,GC.Spread.Sheets.SheetArea.viewport);
let borderObj = {
all:false,
left: false,
right: false,
top: false,
bottom: false,
diagonalUp:false,
diagonalDown:false,
outline:false,
inside:false,
innerHorizontal:false,
innerVertical:false};
range.setBorder(lineBorder, borderObj, sheetArea);
|
最佳答案
查看完整内容
你可以这样
let borderObj = {
all:true,
left: true,
right: true,
top: true,
bottom: true,
diagonalUp:true,
diagonalDown:true,
outline:true,
inside:true,
innerHorizontal:true,
innerVertical:true};
sheet.getRange(0, 0, 2, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(null, borderObj );
把那个range变成你自己的就行
|