Retrieve a list of the hidden worksheets in a spreadsheet
Worksheet visibility is stored in the workbook <sheet/> entries. A hidden worksheet usually has state="hidden" or state="veryHidden".
Workbook markup
<sheets>
<sheet name="Summary" sheetId="1" r:id="rId1"/>
<sheet name="Hidden Data" sheetId="2" state="hidden" r:id="rId2"/>
</sheets>
The worksheet part itself does not carry the display name or workbook visibility state.
Rust workflow
Read the workbook sheet list and filter entries with a hidden state:
#![allow(unused)] fn main() { pub fn get_hidden_worksheets(path: &Path) -> Result<Vec<String>, Box<dyn std::error::Error>> { let document = SpreadsheetDocument::new_from_file_with_settings(path, lazy_settings())?; let workbook_part = document.workbook_part()?; let workbook_xml = workbook_part.data_as_str(&document)?.unwrap_or_default(); Ok(extract_hidden_sheet_names(workbook_xml)) } }
The workbook XML is the source of truth for this query. worksheet_parts(&document) gives access to worksheet content, but hidden state is part of the workbook sheet entry. Treat both hidden and veryHidden as hidden worksheets; the latter is not normally exposed through the worksheet tab UI.