Query Google Spreadsheets using SQL-like syntax. Version 1.1.1 currently stable. The library wraps the Google Visualization API Query Language, allowing SELECT, WHERE, and other SQL-like clauses on spreadsheet data. It supports both public spreadsheets (no auth) and private spreadsheets via any google-auth-library AuthClient (breaking change from v1: previously required direct OAuth2 parameters). The first row is always treated as column headers. Ship with TypeScript type definitions. Release cadence is low, last update was in 2021.
npm install spreadsheet-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Query a public Google Spreadsheet using SQL-like syntax. Shows instantiation, query, and promise handling.
Create an AuthClient (e.g., OAuth2Client) with credentials and pass it as the third argument.
Ensure the first row contains exactly the column names you want to query.
Refer to https://developers.google.com/chart/interactive/docs/querylanguage for supported syntax.
Use GoogleAuth.getClient() with scopes to obtain an AuthClient automatically.
Use `import { PrivateSpreadsheet } from 'spreadsheet-sql'`.Remove unsupported clauses; refer to Google Visualization Query Language spec.
Double-check the spreadsheet key and worksheet name, and ensure the spreadsheet has at least view access.