CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pyexcel-xlsx

A wrapper library to read, manipulate and write data in xlsx and xlsm format

76

1.38x
Overview
Eval results
Files

task.mdevals/scenario-7/

Hidden Sheet Loader

Load workbook data from Excel files while explicitly controlling whether hidden sheets are included.

Capabilities

Default skips hidden sheets

  • Loading a workbook that contains both visible and hidden sheets returns only the visible sheets when include_hidden is left as the default. @test

Optional hidden sheet inclusion

  • When include_hidden is True, the returned mapping contains both visible and hidden sheets with their data in the workbook-defined order. @test

Stream and path inputs

  • Accepts either a filesystem path or a binary stream and applies the same hidden-sheet behavior for both inputs. @test

Implementation

@generates

API

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.
    """

Dependencies { .dependencies }

pyexcel-xlsx { .dependency }

Excel reading support with controls for including hidden sheets.

Install with Tessl CLI

npx tessl i tessl/pypi-pyexcel-xlsx

tile.json