获取所有sheet页名称['测试1','测试2','测试3','测试4']
let name = new Array()
for(let i = 0; i < this.spread.getSheetCount(); i++){
name.push(this.spread.getSheet(i).name())
}
name.map((item, index)=>{
let test2 = this.spread.getSheetIndex('测试2') // 获取《测试2》sheet页下标
判断下标相同隐藏sheet(结果把<测试4隐藏掉了>)
if(index === test2){
sheet.visible(false)
}
})
|
|