or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pyexcel-xlsx@0.6.x
tile.json

tessl/pypi-pyexcel-xlsx

tessl install tessl/pypi-pyexcel-xlsx@0.6.0

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

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.38x

Baseline

Agent success rate without this tile

55%

task.mdevals/scenario-3/

Workbook Summary Generator

Create a utility that reads an Excel workbook (.xlsx/.xlsm) and emits a new summary workbook listing sheet names with their non-empty row counts. Count a row only when it has at least one non-empty cell; completely empty sheets yield a count of 0. The generated workbook must contain a single sheet named SheetSummary with a header row ["sheet_name", "row_count"], followed by one row per included sheet in the original order.

Capabilities

Summarize visible sheets

  • Given a workbook path containing visible and hidden sheets, produce a summary listing only the visible sheets in original order with their non-empty row counts; hidden sheets are omitted by default @test

Optional hidden sheets

  • When include_hidden is true, include hidden sheets in the summary with their non-empty row counts, preserving the workbook's sheet order @test

Stream round-trip

  • Accept in-memory binary input (bytes or BytesIO) for .xlsx or .xlsm content and write the summary workbook to a provided binary stream so the summary can be reloaded from that stream @test

Implementation

@generates

API

from typing import BinaryIO, Dict, List, Union

def summarize_workbook(
    source: Union[str, bytes, BinaryIO],
    destination: Union[str, BinaryIO],
    include_hidden: bool = False,
) -> List[Dict[str, Union[str, int]]]:
    """
    Load an Excel workbook from a file path, bytes, or binary stream,
    build a summary of sheet names and non-empty row counts in original sheet order,
    write that summary to a new workbook with a single sheet named 'SheetSummary',
    and return the summary data as a list of dictionaries.
    """

Dependencies { .dependencies }

pyexcel-xlsx { .dependency }

Provides Excel read/write support for .xlsx and .xlsm files.