A wrapper library to read, manipulate and write data in xlsx and xlsm format
76
Load workbook data from Excel files while explicitly controlling whether hidden sheets are included.
include_hidden is left as the default. @testinclude_hidden is True, the returned mapping contains both visible and hidden sheets with their data in the workbook-defined order. @test@generates
from typing import Any, BinaryIO, Dict, List, Union
SheetData = List[List[Any]]
WorkbookData = Dict[str, SheetData]
FileSource = Union[str, BinaryIO]
def load_sheets(source: FileSource, include_hidden: bool = False) -> WorkbookData:
"""
Read workbook data from an .xlsx or .xlsm file.
- `source` may be a file path or a binary file-like object positioned at the start.
- When `include_hidden` is False, only visible sheets appear in the returned mapping.
- When `include_hidden` is True, include hidden sheets alongside visible ones in workbook order.
- The returned mapping keys are sheet names and values are row-major cell arrays with native Python types.
"""Excel reading support with controls for including hidden sheets.
Install with Tessl CLI
npx tessl i tessl/pypi-pyexcel-xlsxdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10