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-8/

Workbook Page Slice

A utility that reads a rectangular page from a worksheet in an Excel workbook using row and column offsets.

Capabilities

Extracts paginated slices

  • With sheet "Numbers" containing rows [["ID","X","Y","Z"], [1,10,11,12], [2,20,21,22], [3,30,31,32]], calling the API with start row 1, row limit 2, start column 1, column limit 2 returns [[10, 11], [20, 21]]. @test
  • Given the same sheet, requesting start row 0, row limit 3, start column 0, column limit 1 returns [["ID"], [1], [2]], keeping order and width exactly as requested. @test
  • With any sheet, when the starting row offset is at or beyond the number of available rows, the function returns an empty list without error. @test

Implementation

@generates

API

from typing import Any, Union, BinaryIO


def read_paginated_grid(
    source: Union[str, bytes, BinaryIO],
    sheet: str,
    start_row: int,
    row_limit: int,
    start_column: int,
    column_limit: int,
) -> list[list[Any]]:
    """
    Loads a rectangular slice from the given worksheet.
    - source: filesystem path or binary stream pointing to an .xlsx/.xlsm workbook.
    - sheet: worksheet name to read.
    - start_row/start_column: zero-based offsets; values below zero are treated as zero.
    - row_limit/column_limit: maximum count of rows/columns to include; non-positive limits return an empty list.
    Returns row data in order, each row trimmed to the requested column window.
    """

Dependencies { .dependencies }

pyexcel-xlsx { .dependency }

Supports loading Excel workbooks with offset and limit parameters to return partial sheets efficiently. @satisfied-by