roo-a Ruby spreadsheet parser gem

After creating an OpenOffice spreadsheet, I got the following code to run successfully:


require 'C:\Ruby\lib\ruby\gems\1.9.1\gems\roo-1.9.3\lib\roo'

s = Openoffice.new("myspreadsheet.ods")
s.default_sheet = s.sheets.first

s.cell(1,1)
s.cell('A',1)
s.cell(1,'A')
s.cell(1,'A',s.sheets[0])

s.cell(1,1)
s.cell('A',1)                               # same cell
s.cell(1,'A')                               # same cell
s.cell(1,'A',s.sheets[0])
puts s.cell(1,1)

The result was ‘1.0’ output to the command line.

The thing is, to get this to work I had to comment out this line:
#require “google_spreadsheet”
in the google.rb file associated with this gem. No sign of a “google_spreadsheet” anywhere.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: