mtodd / google-spreadsheet-ruby forked from gimite/google-spreadsheet-ruby

Ruby library to read/write Google Spreadsheet

This URL has Read+Write access

name age message
file .gitignore Wed Mar 25 00:56:04 -0700 2009 Fixing a bug which causes error when the cell v... [Hiroshi Ichikawa]
file README.txt Sat Mar 28 23:11:28 -0700 2009 Rewriting Worksheet#rows. [gimite]
file google-spreadsheet-ruby.gemspec Sat Mar 28 23:11:28 -0700 2009 Rewriting Worksheet#rows. [gimite]
directory lib/ Sat Mar 28 23:11:28 -0700 2009 Rewriting Worksheet#rows. [gimite]
directory script/ Tue Dec 23 23:40:01 -0800 2008 Modifying README. [gimite]
README.txt
This is a library to read/write Google Spreadsheet.


= How to install

  $ gem sources -a http://gems.github.com
  $ sudo gem install gimite-google-spreadsheet-ruby


= How to use

Example:
  
  require "rubygems"
  require "google_spreadsheet"
  
  # Logs in.
  session = GoogleSpreadsheet.login("username@gmail.com", "mypassword")
  
  # First worksheet of http://spreadsheets.google.com/ccc?key=pz7XtlQC-PYx-jrVMJErTcg&hl=en
  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()
  
  # Dumps all cells.
  for row in 1..ws.num_rows
    for col in 1..ws.num_cols
      p ws[row, col]
    end
  end
  
  # Yet another way to do so.
  p ws.rows #==> [["fuga", ""], ["foo", "bar]]
  
  # Reloads the worksheet to get changes by other clients.
  ws.reload()

API document: http://gimite.net/gimite/rubymess/google-spreadsheet-ruby/


= Source code

http://github.com/gimite/google-spreadsheet-ruby/tree/master

The license of this source is "New BSD Licence"


= Author

Hiroshi Ichikawa - http://gimite.net/en/index.php?Contact