Repository navigation
Google Sheets
Generated from the thetowersdk repository. Edits made here are overwritten on the next push — change the source file instead.
Community workbooks hold things no save file does. @beardedunicorn/thetowersdk/sheets reads and writes them, and
handles the parts that mislead:
import { TowerSheets } from '@beardedunicorn/thetowersdk/sheets'
const sheets = new TowerSheets({ transport, spreadsheetId, protectSpreadsheets: [COMMUNITY] })
const grid = await sheets.readGrid('Costs!A1:C50') // padded to the shape you asked for
const formulas = await sheets.readFormulas('Derived!A1:A200')
if (formulas.likelySpilled) { /* only the anchor carries a formula */ }Two reads look like data and are not. A spilled cell has no formula of its own, so a formula
read of an ARRAYFORMULA range comes back empty and reads as "plain typed values" — the opposite of
the truth. And the API truncates trailing empties, so a blank cell and an absent column arrive as
the same undefined. Both are reported rather than smoothed over.
Writes to a spreadsheet you name as protected throw rather than skipping, because a silent refusal has your tool report success while the sheet never changed.
There is no googleapis dependency: the package describes the two calls it needs and you supply
them, which keeps it browser-safe and leaves your auth library your choice.
templates/sheets-client.ts is the adapter, and
docs/GOOGLE_SHEETS.md walks through registering a service account and
sharing a sheet with it.
Generated from TheTowerSDK — do not edit here. Docs and live demos: https://beardedunicorn.github.io/TheTowerSDK/
- Workshop
- Workshop Enhancements
- Labs
- Cards
- Modules
- Module Rarities and Merging
- Module Substats
- Module Upgrade Costs
- Ultimate Weapons
- Ultimate Weapon Plus
- Bots
- Guardian
- Relics
- Themes
- Tiers
- Battle Conditions
- Enemies
- Perks
- Tournaments
- Milestones
- The Vault
- Daily Missions
- Guild
- Currencies
- Reference Tables
- Glossary
- Irreversible Upgrades
- Game Patch Notes
- Game Version History
SDK
- Quick Start
- Entry Points
- How It Fits Together
- Getting an Official Game Export
- Reading a Save
- Reading The Community Wiki
- Game 29.1 Data
- Formulas
- Builders
- Charts
- Effective Paths
- Examples
- Templates
- Building a Bot On This
- Google Sheets
- Desktop and Mobile
- Optional Add-ons
- Using It With An AI Agent
- Using Your Own Artwork
- Names And Acronyms
- Patch Notes
- Accuracy
- Versioning
- Where the Docs Live
- Contributing
- Credits
- License
Guides
Examples
- 01-browse-game-data.ts
- 02-read-a-save-file.ts
- 03-plan-upgrades-from-a-save.ts
- 04-generate-a-chart.ts
- 05-generate-a-cost-table.ts
- 06-read-the-community-wiki.ts
- 07-format-like-the-game.ts
- 08-build-a-calculator.ts
- 09-build-a-bot.ts
- 10-read-a-sheet.ts
- 11-build-a-knowledge-base.ts
- 12-show-module-and-card-art.ts
Templates