From b9323c5502e1d18cda406fa2978d5b563fa13d27 Mon Sep 17 00:00:00 2001 From: Nabeel Date: Wed, 7 Oct 2020 01:25:37 +0500 Subject: [PATCH] Update 78_writebiff.js fix(print): Excel crashes when printing XLS fix provided by the SheetJSDev in https://github.com/SheetJS/sheetjs/issues/1967. --- bits/78_writebiff.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits/78_writebiff.js b/bits/78_writebiff.js index 7953c8f..6d0cf37 100644 --- a/bits/78_writebiff.js +++ b/bits/78_writebiff.js @@ -245,7 +245,7 @@ function write_ws_biff8(idx/*:number*/, opts, wb/*:Workbook*/) { } var cname/*:string*/ = _sheet.CodeName || _sheet.name || s; /* ... */ - if(b8 && _WB.Views) write_biff_rec(ba, "Window2", write_Window2(_WB.Views[0])); + if(b8) write_biff_rec(ba, "Window2", write_Window2((_WB.Views||[])[0])); /* ... */ if(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, "MergeCells", write_MergeCells(ws['!merges'])); /* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */