Search code examples
excelxlsx

Excel does not show hidden sheet but if i unzip it, then there are 2 worksheets


So i was writing a program that reads excel files using a .net library and i got confussed when i saw that some excel file has 2 worksheets. I opened it up in excel and tried to use unhide option, but it was grayed out as if there was no hidden sheets but when i unziped the excel file, then there where indeed 2 files in xl > worksheets folder.

Why it cannot be unhiden? Is there other option that could make worksheet invisible? Or did excel create this worksheet for something and it cannot be unhidden?


Solution

  • Ok, i found out that apparently excel worksheet can have state of "Visible", "Hidden" or "VeryHidden". Excel options hide and unhide toggle between states of Visible and Hidden.

    The question is, how and when excel changes worksheet state to VeryHidden? It seems that it can only be changed to VeryHidden using Visual Basic Editor. You can also unzip excel file and manually change it inside workbook.xml located in xl folder.