Bug 118668 - FILEOPEN: Librecalc doesn't show all sheets in XLSX modified with exceljs
Summary: FILEOPEN: Librecalc doesn't show all sheets in XLSX modified with exceljs
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-External-Generators
  Show dependency treegraph
Reported: 2018-07-10 14:37 UTC by Ilya Zubakin
Modified: 2021-07-14 11:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:

buggy file (26.13 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-07-10 14:38 UTC, Ilya Zubakin
Second sheet displayed in MSO Excel (8.64 KB, image/png)
2018-07-11 09:39 UTC, Xisco Faulí
Source file (32.08 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-07-12 14:13 UTC, Ilya Zubakin

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Zubakin 2018-07-10 14:37:53 UTC
Librecalc doesn't find the second sheet in the workbook.

Steps to Reproduce:
1. Open attached file 

Actual Results:
You can't find the second sheet.

Expected Results:
You can find the second sheet

Reproducible: Always

User Profile Reset: No

Additional Info:
Gnumeric opens this file well.
Comment 1 Ilya Zubakin 2018-07-10 14:38:39 UTC
Created attachment 143426 [details]
buggy file
Comment 2 Mike Kaganski 2018-07-10 14:51:14 UTC
Reproducible using Version: (x64)
Build ID: 378e26bd4f22a135cef5fa17afd5d4171d8da21a
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL

Specifically: when opening in LibreOffice, the second sheet is hidden, and available in menu Sheet→Show Sheet...

In Excel 2013, both sheets are visible right away.
Comment 3 Ilya Zubakin 2018-07-10 14:55:08 UTC Comment hidden (obsolete)
Comment 4 Mike Kaganski 2018-07-10 15:04:01 UTC
(In reply to Ilya Zubakin from comment #3)
> Thanks, I see it. Why is the second disabled?

Because presumably there's a bug that needs investigation; that I had confirmed in my comment 1, and you have set back to UNCONFIRMED for some reason.

Setting back to NEW.
Comment 5 Xisco Faulí 2018-07-11 09:39:24 UTC
Created attachment 143449 [details]
Second sheet displayed in MSO Excel
Comment 6 Xisco Faulí 2018-07-11 09:40:35 UTC
Also reproducible in

Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-
Comment 7 Timur 2018-07-11 15:05:53 UTC
If buggy XLSX is saved in MSO 2013 or 2016, than LO opens both sheets.
Comment 8 Timur 2018-07-11 15:24:30 UTC
sheet2.xml from attached xlsx:
<sheetView workbookViewId="0" zoomScale="200" zoomScaleNormal="23" view="pageBreakPreview">
			<selection activeCell="T9" sqref="T9"/>

sheet2.xml from saved xlsx:
<sheetView tabSelected="1" view="pageBreakPreview" zoomScale="200" zoomScaleNormal="23" workbookViewId="0">
			<selection activeCell="T9" sqref="T9"/>

tabSelected="1" is missing in original xlsx.

If more than one SheetView.TabSelected is set to true, it looks like Excel just picks the first one. Maybe also the same if it's missing from all sheets, like with attached xlsx.

Ilya, please describe how the spreadsheet was generated, e.g. Excel (which version) and how it was manually modified with which software.
Comment 9 Ilya Zubakin 2018-07-12 14:12:15 UTC
This spreadsheet was saved with MSO 2016 then modified with exceljs v1.5.1 (https://github.com/guyonroche/exceljs/). 
I modified it with older version exceljs and all works fine for me.

Thanks for your help. I am going to open the issue in exceljs project.

By the way, Calc opens the source file without this problem.
Comment 10 Ilya Zubakin 2018-07-12 14:13:44 UTC
Created attachment 143520 [details]
Source file
Comment 11 Mike Kaganski 2018-07-12 14:49:50 UTC
(In reply to Timur from comment #8)

If it is the tabSelected attribute that causes this, then we have a bug with that. The attribute is used to indicate (possibly multiple) selection of sheets, not their visibility. And it is optional (according to ECMA-376-1:2016).

Anyway, this is a proper bug report, which shouldn't be closed until fixed.
Comment 12 Timur 2018-12-27 18:35:01 UTC
(In reply to Ilya Zubakin from comment #9)
>I am going to open the issue in exceljs project.
Please link. I found https://github.com/guyonroche/exceljs/issues/630 and https://github.com/guyonroche/exceljs/issues/648.
Not sure anymore this is a bug.
Comment 13 QA Administrators 2020-12-27 03:36:25 UTC Comment hidden (spam)