17版本 设计器中 数据透视表默认打开右侧面板,方法无效, |
|
// 切换sheet 设置行数 列数
spread.bind(GC.Spread.Sheets.Events.ActiveSheetChanged, (sender, args) => {
console.log(sender, args.newSheet.name());
// 切换sheet 默认选中任意一个单元格 显示及刷新面板
const sheet = args.newSheet;
const pivot = sheet.pivotTables.all()[0];
const { row, col } = pivot.getRange().content;
console.log(row, col);
sheet.setActiveCell(row, col);
GC.Spread.Sheets.Designer.getCommand(GC.Spread.Sheets.Designer.CommandNames.ShowFieldList).execute(
this.designer
);
});
|
|