Get the latest tech news

Reading Google Sheets from a Go Program


I recently needed to process some data from a Google Sheet in a Go program, and was looking for the most straightforward way to do so on my local machine. Using gcloud's ADC didn't work for me because it typically doesn't have access to sheets or docs.

I recently needed to process some data from a Google Sheet in a Go program, and was looking for the most straightforward way to do so on my local machine. Note the docId passed to the sheets package; this is the path segment in your spreadsheet's URL following the/d/. Unlike the quickstart, it handles all the token exchange process automatically without having to ask you to copy a code from a web page.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Google

Google

Photo of Google Sheets

Google Sheets

Photo of program

program

Related news:

News photo

There's a Program to Cancel Some Private US Student Loans. Most Don't Know About It.

News photo

Google, Amazon, Apple lobby group opposes India's EU-like antitrust proposal

News photo

News Weekly: Fitbit Ace LTE launch, Google suffers a worldwide outage, and more