Skip to content

Simple Google Sheets API Demo

mathison42 edited this page Aug 30, 2016 · 3 revisions

This is a quick guide to running your own Google Sheets API post and get commands.

  1. Download the repository locally

  2. Open /src/main/groovy/Runner.groovy

  3. Edit the following values:

  • Application_Name // The name of your application
  • Data_Store_Dir // File location to store your Google credentials after authentication
  • spreadsheetId // The Google Sheets unique ID.
  • data // 2-D Array[Row][Column] containing data to store
  • postRange // The rows and/or columns to Post data to the Google Sheet. [A1 Notation] (https://developers.google.com/sheets/guides/concepts#a1_notation)
  • getRange // The rows and/or columns to Get data from the Google Sheet. A1 Notation
  1. Create your own client_secret.json and save it into /src/main/resources - Directions currently located within /src/main/resources

  2. Build with gradle build

  3. Run with gradle runner

Clone this wiki locally