function main(spreadsheetReport) {
var hideSheets = ['数据1', '数据2']; //数组里边写需要隐藏的sheet页名称
for (var k = 0; k < hideSheets.length; k++) {
var removeSheetName = hideSheets[k];
for (var i = 0; i < spreadsheetReport.visibleSheetNames.length; i++) {
if (spreadsheetReport.visibleSheetNames[i] == removeSheetName) {
var row = spreadsheetReport.sheetsTable.rows[0];
for (var j = 0; j < row.cells.length; j++) {
if (row.cells[j]._sheetName == removeSheetName) {
row.removeChild(row.cells[j]);
break;
}
}
spreadsheetReport.visibleSheetNames.splice(i, 1);//删除
break;
}
}
}
if (spreadsheetReport.moreTdSheets) {
var div = spreadsheetReport.moreTdSheets.firstChild;
while (div) {
if (div._sheetName == removeSheetName) {
spreadsheetReport.moreTdSheets.removeChild(div);
break;
}
div = div.nextSibling;
}
}
spreadsheetReport.doOnWindowResize({
target: window
});
}