返回首页
Simon Willison's Weblog

SQL functions in Google Sheets to fetch data from Datasette

7.5Score
SQL functions in Google Sheets to fetch data from Datasette
AI 深度提炼
  • Google Sheets 的 importdata 函数可直接拉取 Datasette 公开数据
  • 需认证时可用 Google Apps Script 发送带 Token 的请求
  • 命名函数可封装 importdata 提升复用性和可读性
#Google Sheets#Datasette#SQL#API 集成
打开原文

TIL: SQL functions in Google Sheets to fetch data from Datasette

[Simon Willison’s Weblog](http://simonwillison.net/)

Subscribe

**Sponsored by:** Honeycomb — AI agents behave unpredictably. Get the context you need to debug what actually happened. Read the blog

20th April 2026

TILSQL functions in Google Sheets to fetch data from Datasette— I've been experimenting with ways to fetch data from Datasette and display it in Google Sheets.

I put together some notes on patterns for fetching data from a Datasette instance directly into Google Sheets - using the `importdata()` function, a "named function" that wraps it or a Google Apps Script if you need to send an API token in an HTTP header (not supported by `importdata()`.)

Here's an example sheet demonstrating all three methods.

![Image 2: None](https://til.simonwillison.net/google-sheets/datasette-sql)

Posted 20th April 2026 at 2:33 am

Recent articles

This is a **beat** by Simon Willison, posted on 20th April 2026.

google 405spreadsheets 7datasette 1478

Monthly briefing

Sponsor me for **$10/month** and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe