export type WorkbookViewVisibility = 'visible' | 'hidden' | 'veryHidden'; export interface WorkbookView { visibility?: WorkbookViewVisibility; minimized?: boolean; showHorizontalScroll?: boolean; showVerticalScroll?: boolean; showSheetTabs?: boolean; /** Window x position in screen pixels — Excel restores it when re-opening. */ xWindow?: number; /** Window y position. */ yWindow?: number; windowWidth?: number; windowHeight?: number; /** Width of the sheet tab strip relative to the horizontal scroll bar (0..1000, default 600). */ tabRatio?: number; /** Index of the leftmost visible sheet tab (0-based). */ firstSheet?: number; /** Index of the currently active sheet tab (0-based). */ activeTab?: number; autoFilterDateGrouping?: boolean; } export declare const makeWorkbookView: (opts?: WorkbookView) => WorkbookView; export type CustomViewShowComments = 'commNone' | 'commIndicator' | 'commIndAndComment'; export type CustomViewShowObjects = 'all' | 'placeholders' | 'none'; export interface CustomWorkbookView { name: string; guid: string; /** Window width in screen pixels — required when the element is present. */ windowWidth: number; windowHeight: number; /** Index (0-based) of the sheet active in this saved view. */ activeSheetId: number; autoUpdate?: boolean; /** Auto-merge interval in minutes (for shared workbooks). */ mergeInterval?: number; changesSavedWin?: boolean; onlySync?: boolean; personalView?: boolean; includePrintSettings?: boolean; includeHiddenRowCol?: boolean; maximized?: boolean; minimized?: boolean; showHorizontalScroll?: boolean; showVerticalScroll?: boolean; showSheetTabs?: boolean; xWindow?: number; yWindow?: number; tabRatio?: number; showFormulaBar?: boolean; showStatusbar?: boolean; showComments?: CustomViewShowComments; showObjects?: CustomViewShowObjects; } export declare const makeCustomWorkbookView: (opts: Pick & Partial) => CustomWorkbookView; import type { Workbook } from './workbook'; /** Get the index of the active sheet tab (0-based) from the primary workbookView, or 0 if unset. */ export declare const getActiveTab: (wb: Workbook) => number; /** Set the active sheet tab (0-based) on the primary workbookView. */ export declare const setActiveTab: (wb: Workbook, index: number) => void; /** Get the index of the leftmost visible sheet tab from the primary workbookView, or 0 if unset. */ export declare const getFirstSheet: (wb: Workbook) => number; /** Set the leftmost visible sheet tab on the primary workbookView. */ export declare const setFirstSheet: (wb: Workbook, index: number) => void; /** Set the tab strip width ratio (0..1000, Excel default 600). */ export declare const setTabRatio: (wb: Workbook, ratio: number) => void; /** Toggle the sheet tab strip visibility. */ export declare const setShowSheetTabs: (wb: Workbook, show: boolean) => void; /** Toggle the horizontal scroll bar in Excel's window chrome. */ export declare const setShowHorizontalScroll: (wb: Workbook, show: boolean) => void; /** Toggle the vertical scroll bar in Excel's window chrome. */ export declare const setShowVerticalScroll: (wb: Workbook, show: boolean) => void; /** * Toggle the workbook window minimised state. Excel honours this on * reopen so the file restores into the minimised state it was saved * with. */ export declare const setWorkbookMinimized: (wb: Workbook, minimized: boolean) => void; /** Set the visibility of the workbook window itself ('visible' / 'hidden' / 'veryHidden'). */ export declare const setWorkbookVisibility: (wb: Workbook, visibility: WorkbookViewVisibility) => void; /** * Set window position + size on the primary workbookView in one call. * Pass `undefined` for any axis to leave it untouched. */ export declare const setWorkbookWindow: (wb: Workbook, opts: { xWindow?: number; yWindow?: number; windowWidth?: number; windowHeight?: number; }) => void;