您可以参考下面的代码为给每个层级都设置折叠
- var rgi = sheet.rowOutlines.find(1, 0);
- var rgi2 = sheet.rowOutlines.find(3, 1);
- var rgi3 = sheet.rowOutlines.find(5, 2);
- var rgi4 = sheet.rowOutlines.find(7, 3);
- var rgi5 = sheet.rowOutlines.find(9, 4);
-
- sheet.rowOutlines.expandGroup(rgi, false);
- sheet.rowOutlines.expandGroup(rgi2, false);
- sheet.rowOutlines.expandGroup(rgi3, false);
- sheet.rowOutlines.expandGroup(rgi4, false);
- sheet.rowOutlines.expandGroup(rgi5, false);
复制代码
|