A wrapper library to read, manipulate and write data in xlsx and xlsm format
76
A utility that reads a rectangular page from a worksheet in an Excel workbook using row and column offsets.
[["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[["ID"], [1], [2]], keeping order and width exactly as requested. @test@generates
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.
"""Supports loading Excel workbooks with offset and limit parameters to return partial sheets efficiently. @satisfied-by
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