Skip to content

Excel crashes when printing XLS from https://sheetjs.com/demo/table.html #1967

Closed

Description

@lwinsor

Steps to produce the problem:

  1. From https://sheetjs.com/demo/table.html click [Export to XLS!]
  2. For comparison, export XLSX and XLSB too.
  3. Open the file in Excel 365. In Excel, click [Enable Editing].
  4. Ctrl-P to print. ** CRASH **
    OR
  5. From https://sheetjs.com/demo/table.html click [Export to XLS!]
  6. Open the file in Excel 2010. Excel title bar shows 'compatibility mode'.
  7. Ctrl-P to print. ** CRASH **

The same process does NOT crash if I choose XLSX or XLSB.

The problem details from Excel show fault module mso20win32client.dll for Excel 365 or MSVCR90.dll for Excel 2010.

Many thanks!

Bug seen on:
Windows 7, Chrome, Excel 365
Windows 7, Chrome Excel 2010 32-bit

Activity

  1. lwinsor commented on May 25, 2020

    @lwinsor
    Author

    Also seen on Windows 10.

  2. zzfzfz commented on Aug 31, 2020

    @zzfzfz

    the same bug.
    Excel crashes when printing XLS
    Is there any solution?@lwinsor @SheetJSDev

  3. SheetJSDev commented on Aug 31, 2020

    @SheetJSDev
    Contributor

    One-line fix (feel free to send a PR): https://github.com/SheetJS/sheetjs/blob/master/bits/78_writebiff.js#L248

    -	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]));
  4. zzfzfz commented on Aug 31, 2020

    @zzfzfz

    it work for me.Thanks @SheetJSDev

  5. added a commit that references this issue on Oct 6, 2020
  6. SheetJSDev commented on Oct 6, 2020

    @SheetJSDev
    Contributor

    0.16.8 update added the fix. the XLS file exported by the page does not cause Excel to crash when printing.

  7. added a commit that references this issue on Dec 18, 2022
  8. added a commit that references this issue on Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions