Skip to content

Instantly share code, notes, and snippets.

@alea12
Created February 12, 2016 00:06
Show Gist options
  • Save alea12/68a96023085637e31f4c to your computer and use it in GitHub Desktop.
Save alea12/68a96023085637e31f4c to your computer and use it in GitHub Desktop.
gd
require "google/api_client"
require "google_drive"
session = GoogleDrive.saved_session("config.json")
ws = session.spreadsheet_by_key("pz7XtlQC-PYx-jrVMJErTcg").worksheets[0]
# Gets content of A2 cell.
p ws[2, 1] #==> "hoge"
# Changes content of cells.
# Changes are not sent to the server until you call ws.save().
ws[2, 1] = "foo"
ws[2, 2] = "bar"
ws.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment