Skip to content

feat: add duplicateSheet tool#68

Merged
a-bonus merged 1 commit intoa-bonus:mainfrom
a-pedraza:feat/duplicate-sheet
Feb 23, 2026
Merged

feat: add duplicateSheet tool#68
a-bonus merged 1 commit intoa-bonus:mainfrom
a-pedraza:feat/duplicate-sheet

Conversation

@a-pedraza
Copy link
Copy Markdown

Summary

Adds a new duplicateSheet tool that duplicates a sheet (tab) within a spreadsheet, copying all values, formulas, formatting, validations, and conditional formatting.

Closes #67

Changes

  • New: src/tools/sheets/duplicateSheet.ts — Tool implementation using spreadsheets.batchUpdate with DuplicateSheetRequest
  • Modified: src/tools/sheets/index.ts — Added import and registration

Parameters

Parameter Type Required Description
spreadsheetId string Yes The spreadsheet ID
sheetId number (int) Yes Numeric sheet ID to duplicate
newSheetName string No Name for the copy (auto-named if omitted)

Testing

Tested against a live Google Sheets spreadsheet:

  • Duplicates sheet with all formulas intact
  • Duplicates sheet with all formatting preserved
  • Optional newSheetName works correctly
  • Build passes (tsc with zero errors)

Adds a new `duplicateSheet` tool that duplicates a sheet (tab) within
a spreadsheet, copying all values, formulas, formatting, validations,
and conditional formatting.

Uses `spreadsheets.batchUpdate` with `DuplicateSheetRequest`.
Parameters: `spreadsheetId`, `sheetId` (numeric), optional `newSheetName`.
@a-bonus a-bonus merged commit de76e15 into a-bonus:main Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add duplicateSheet tool

2 participants