CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-pygsheets

tessl install tessl/pypi-pygsheets@2.0.0

Google Spreadsheets Python API v4

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.23x

Baseline

Agent success rate without this tile

62%

task.mdevals/scenario-7/

Worksheet Tab Manager

A helper for keeping a spreadsheet's tabs organized, positioned, and prepared for data entry.

Capabilities

Create or reuse worksheet at position

  • When a tab title is absent, create a worksheet at the requested index with the given row and column counts, and return it for further updates. @test
  • When a tab with the same title already exists at a different index, move it to the requested position instead of creating a duplicate, keeping its grid at least as large as the requested size. @test

Rename and visibility

  • Rename a target worksheet to a new title and toggle its visibility flag while keeping its position unchanged. @test

Resize and freeze

  • Grow a worksheet to at least the requested row and column sizes and freeze the specified top rows and left columns. @test

Implementation

@generates

API

class WorksheetManager:
    def ensure_sheet(self, spreadsheet, title: str, index: int | None = None, rows: int = 100, cols: int = 26):
        """Return a worksheet with the given title at the requested index; create or reposition it and apply initial sizing."""

    def rename_and_set_visibility(self, spreadsheet, current_title: str, new_title: str | None = None, hidden: bool = False):
        """Rename a worksheet and set whether it is hidden, without altering its order."""

    def resize_and_freeze(self, worksheet, rows: int, cols: int, freeze_rows: int = 0, freeze_cols: int = 0):
        """Ensure the worksheet has at least the given grid size and applies frozen panes on top rows and left columns."""

Dependencies { .dependencies }

pygsheets { .dependency }

Sheet and worksheet management for Google Sheets.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pygsheets@2.0.x
tile.json