From a8d129bded5f523ca0df5a7bbf35f04ebd03457d Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Thu, 9 Oct 2025 10:57:56 +0300 Subject: [PATCH] [se] Fix bug 77052 --- cell/view/WorkbookView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cell/view/WorkbookView.js b/cell/view/WorkbookView.js index e7244f03f7..e9c0511ccd 100644 --- a/cell/view/WorkbookView.js +++ b/cell/view/WorkbookView.js @@ -4147,7 +4147,9 @@ this._calcPagesPrintSheet(i, printPagesData, false, adjustPrint); } } else if (printType === Asc.c_oAscPrintType.Selection) { - this._calcPagesPrintSheet(nActive, printPagesData, true, adjustPrint); + let _activeSheetsArray = adjustPrint && adjustPrint.asc_getActiveSheetsArray && adjustPrint.asc_getActiveSheetsArray(); + let activeSheet = _activeSheetsArray && _activeSheetsArray[0] != null ? _activeSheetsArray[0] : null; + this._calcPagesPrintSheet(activeSheet != null ? activeSheet : nActive, printPagesData, true, adjustPrint); } if (this.printPreviewState.isNeedShowError(AscCommonExcel.c_kMaxPrintPages === printPagesData.arrPages.length)) {