Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby library to read/write Google Spreadsheet using Google OAuth protocol instead of Google username and password

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 google-spreadsheet-ruby.gemspec

This is a Ruby 1.8/1.9 library to read/write Google Spreadsheet.

How to install

$ gem sources -a
$ sudo gem install google-spreadsheet-ruby

Note that gimite-google-spreadsheet-ruby at is no longer updated, because github stopped hosting it.

How to use


require "rubygems"
require "google_spreadsheet"

# Logs in.
# You can also use OAuth. See document of GoogleSpreadsheet.login_with_oauth for details.
session = GoogleSpreadsheet.login("", "mypassword")

# First worksheet of
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[2, 1] = "foo"
ws[2, 2] = "bar"

# Dumps all cells.
for row in
  for col in
    p ws[row, col]

# Yet another way to do so.
p ws.rows #==> [["fuga", ""], ["foo", "bar]]

# Reloads the worksheet to get changes by other clients.

API document:

Source code

The license of this source is “New BSD Licence”

Supported environments

Ruby 1.8.x and Ruby 1.9.x. Checked with Ruby 1.8.7 and Ruby 1.9.1.


Hiroshi Ichikawa -

Something went wrong with that request. Please try again.