Issue 117975 - XLSX: Calc is showing hidden sheet
Summary: XLSX: Calc is showing hidden sheet
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 3.3
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2011-05-03 10:35 UTC by tariqzubairy
Modified: 2013-01-29 21:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

first sheet hidden issue (13.74 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2011-05-03 10:35 UTC, tariqzubairy
no flags Details
patch for hidden sheet in xlsx (4.71 KB, patch)
2012-09-18 08:37 UTC, bjcheny
companycy: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description tariqzubairy 2011-05-03 10:35:18 UTC
Created attachment 76478 [details]
first sheet hidden issue

Sheet 1 named "TODO-POI" in attached spreadsheet is set as hidden in Excel.

When opening the spreadsheet in Calc (using openoffice 3.3), calc unable to recognize the sheet as hidden.

Note: This behavior is observed only if the first sheet is set as hidden.
Comment 1 Marcus 2012-03-03 11:36:21 UTC
I can see the hidden sheet, too

however, this issue is no P1
Comment 2 bjcheny 2012-09-18 05:07:26 UTC
I am working on it.
Comment 3 bjcheny 2012-09-18 08:37:16 UTC
Created attachment 79550 [details]
patch for hidden sheet in xlsx

When loading xlsx, it's supposed to set sheet hidden if necessary.
However, in ScDocFunc::SetTableVisible, it misses ooxml case when trying to skip setting hidden property. That's why I add a flag to indicate ooxml. 

Below code is to ensure when there is only 1 sheet, and it's hidden, Aoo will still show it.

        if ( !bVisible && !pDoc->IsImportingXML()      // #i57869# allow hiding in any order for loading
             && !pDoc->IsImportingMSXML())
		sal_uInt16 nVisCount = 0;
		SCTAB nCount = pDoc->GetTableCount();
		for (SCTAB i=0; i<nCount; i++)
			if (pDoc->IsVisible(i))

		if (nVisCount <= 1)
			if (!bApi)
			return sal_False;