Access Google doc as api

This is pretty cool, here's one way

  • in a goolge doc, click Share ->Publish to Web
  • click Start Publishing
  • you can choose output format for spreadsheets e.g. html, csv, txt etc
  • you'll see a url on the page, you can actually now hit that url

This is where it gets cool, you can issue a curl command against that url and pipe to a file
e.g.
curl 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=<the_key>&output=csv' -o data.csv

So you can curl a google doc onto a server!

Comments

Popular posts from this blog

deep dive into Material UI TextField built by mui

angular js protractor e2e cheatsheet

react-router v6.4+ loaders, actions, forms and more