Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Roo provides an interface to Open Office, Excel, and Google Spreadsheets.
Ruby JavaScript
branch: master

This branch is 12 commits ahead, 10 commits behind hmcgowan:master

Failed to load latest commit information.
examples first commit from roo-1.2.3
lib Merge branch 'donibuchanan/master'
scripts first commit from roo-1.2.3
test Merge branch 'donibuchanan/master'
.gitignore update roo to use ruby-spreadsheet from parseexcel
History.txt first commit from roo-1.2.3
License.txt first commit from roo-1.2.3
Manifest.txt first commit from roo-1.2.3
README.markdown add message about Roo 1.9
Rakefile hpricot => nokogiri
VERSION.yml Version bump to 1.4.1
base64include.rb first commit from roo-1.2.3
roo.gemspec Regenerated gemspec for version 1.4.1
setup.rb first commit from roo-1.2.3


README for Roo

Roo is available here and on Rubyforge. You can install the official release with 'gem install roo' or refer to the installation instructions below for the latest development gem.

NOTE: Roo 1.9 was released by Thomas and I think it was intended for Ruby 1.9 but the dependencies are not working properly so everyone gets it with a gem install Roo. I'm trying to get a hold of him to work out how to fix things.

In the meantime, Roo 1.3.11 should be on gemcutter and works with Ruby 1.8 with no known issues. I'll continue to maintain this version in the interim.


# Run the following if you haven't done so before:
gem sources -a

# Install the gem:
sudo gem install roo -v 1.3.11


require 'rubygems'
require 'roo'

s ="myspreadsheet.ods")      # creates an Openoffice Spreadsheet instance
s ="myspreadsheet.xls")           # creates an Excel Spreadsheet instance
s ="myspreadsheetkey_at_google") # creates an Google Spreadsheet instance
s ="myspreadsheet.xlsx")         # creates an Excel Spreadsheet instance for Excel .xlsx files

s.default_sheet = s.sheets.first  # first sheet in the spreadsheet file will be used

# s.sheet is an array which holds the names of the sheets within
# a spreadsheet.
# you can also write
# s.default_sheet = s.sheets[3] or
# s.default_sheet = 'Sheet 3'

s.cell(1,1)                                 # returns the content of the first row/first cell in the sheet
s.cell('A',1)                               # same cell
s.cell(1,'A')                               # same cell
s.cell(1,'A',s.sheets[0])                   # same cell

# almost all methods have an optional argument 'sheet'.
# If this parameter is omitted, the default_sheet will be used.                                      # prints infos about the spreadsheet file

s.first_row                                 # the number of the first row
s.last_row                                  # the number of the last row
s.first_column                              # the number of the first column
s.last_column                               # the number of the last column

# limited font information is available


see for a more complete tutorial

Something went wrong with that request. Please try again.