Menu

Google Sheets API: 6 traps I measured
📰

Google Sheets API: 6 traps I measured

DEV Community: python·Ikkun·6 days ago
#JzuVm4OD
#devtopython#devto#dev#write#append
Long article (630 words) — no AI summary yet.
Reading 0:00
15s threshold

Every Sheets API tutorial I have read assumes a tab called Sheet1 and a value that means what it looks like. This morning I created a throwaway spreadsheet, sent a dozen writes at v4, read each one back three ways, then deleted it. Six behaved differently than I expected.

Why does USER_ENTERED store 2026-01-15 as 46037?

Because valueInputOption=USER_ENTERED hands the string to the same parser a person typing into the grid uses. Read the cell back with valueRenderOption=UNFORMATTED_VALUE and the date is gone:

Sent as USER_ENTERED Stored (unformatted) What happened

2026-01-15 46037 date serial

2026-01 46023 month collapsed to the 1st

1/2 46024 read as January 2, not a fraction

00123 123 leading zeros dropped

50% 0.5 percentage

=1+1 2 evaluated

The same six strings with RAW came back unchanged. FORMATTED_VALUE still displays 2026-01-15 after the write, so the round trip looks clean in a browser and breaks the moment a second program reads the cell.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.