Need help with cell access

49 views
Skip to first unread message

Craig Anderson

unread,
Sep 30, 2014, 12:07:35 PM9/30/14
to ruby...@googlegroups.com

I get same results with JRuby and cruby.

This script:

require 'rubygems'
require 'bundler/setup'

require 'roo'

s = Roo::OpenOffice.new("20140929_gbr_quiz_fixed.ods") 
s.default_sheet = s.sheets.first

(s.first_row..s.last_row).each do |row_index|
  puts "row #{row_index} A [#{s.cell(row_index,'A')}] B [#{s.cell(row_index,'B')}] C [#{s.cell(row_index,'C')}] D [#{s.cell(row_index,'D')}]"
end

I am not getting the column data I expect:

A is empty
B show data from col. A
C is empty
D shows data from col. B

Help please.

Reply all
Reply to author
Forward
0 new messages