Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(ns analyze.spit-sheets)
(import com.google.api.services.sheets.v4.SheetsScopes)
(require 'google-apps-clj.credentials)
(require '[google-apps-clj.google-sheets-v4 :as gs4])
(def scopes [SheetsScopes/DRIVE SheetsScopes/SPREADSHEETS])
(def creds (google-apps-clj.credentials/default-credential scopes))
;(println (gd/list-files! creds "0BxDSmBQ-JH6xLTZ5R3psbkUzNEE"))
(def service (gs4/build-service creds))
(def spreadsheet "1C8GRZHsOQkh8tevMjEs1N_pq8khDvs3WluLBzD8ruF4")
(def worksheet (-> (gs4/get-spreadsheet-info service spreadsheet)
(get "sheets")
first
(get "properties")
(get "sheetId")))
(defn spit-sheet [data]
(gs4/write-sheet service spreadsheet worksheet data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.