Project

tablespoon

0.0
No commit activity in last 3 years
No release in over 3 years
Read and write Google Spreadsheets like records
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3.0
~> 1.8.4
~> 3.12

Runtime

>= 0.3.0
 Project Readme

tablespoon¶ ↑

Access Google Spreadsheets in a vaguely record-like way.

Requirements¶ ↑

  • Google Spreadsheet that is organized like a database table. Fieldnames in the first row, records in the rest of the rows.

Installation¶ ↑

sudo gem install tablespoon

How to Use¶ ↑

require 'rubygems'
require 'tablespoon'

Connect to a Google doc

doc   = Tablespoon::Doc.new( "0ArhhvPZdTe-WdGpZQ3pEY1hDcEUxWmxwNnJEQ3g4aVE", 
                         :username => google_username, :password => google_password )

Get a worksheet either by name or by id. (Coming soon: Optionally, declare an id field so you can find rows by id later.)

rows = doc.get_table 'Sheet1', :id_field => 'last-name'

Loop thru rows and retrieve data

rows.each do |r|
  puts r['full-name']    
end

Modify fields and save data back to the spreadsheet.

rows.each do |r|
  r['full-name'] = r['full-name'].upcase
end

Copyright © 2013 Matt Ericson. See LICENSE.txt for further details.