Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(sheet): get unhidden sheets (#2616)

Dushusirbcc403408536
diff --git a/packages/core/src/sheets/workbook.ts b/packages/core/src/sheets/workbook.ts
index 3824fd1fcb..e1cc72739c 100644
--- a/packages/core/src/sheets/workbook.ts
+++ b/packages/core/src/sheets/workbook.ts
@@ -328,6 +328,12 @@ export class Workbook extends UnitModel<IWorkbookData, UniverInstanceType.UNIVER
.map((s) => s.getConfig().id);
}
+ getUnhiddenWorksheets(): string[] {
+ return this.getSheets()
+ .filter((s) => s.getConfig().hidden !== BooleanNumber.TRUE)
+ .map((s) => s.getConfig().id);
+ }
+
load(config: IWorkbookData) {
// TODO: new Command
this._snapshot = config;