Can ruby-spreadsheet read\write open office ods files?

there are two files :/home/pt/test/codetable.xls
,/home/pt/test/codetable.ods
the program1 can run:
require ‘rubygems’
require ‘spreadsheet’
Spreadsheet.client_encoding = ‘UTF-8’
xls = Spreadsheet.open ‘/home/pt/test/codetable.xls’
sheet = xls.worksheet 0
sheet.each do |row|
puts row
end
but program2 can’t run:
require ‘rubygems’
require ‘spreadsheet’
Spreadsheet.client_encoding = ‘UTF-8’
xls = Spreadsheet.open ‘/home/pt/test/codetable.ods’
sheet = xls.worksheet 0
sheet.each do |row|
puts row
end

can ruby-spreadsheet read\write open office ods files?

According to homepage of spreadsheet gem
(http://spreadsheet.rubyforge.org/)
, it’s compatible with Microsoft Excel only.

On Tuesday, May 18, 2010 01:52:32 am Pen T. wrote:

can ruby-spreadsheet read\write open office ods files?

It seems to only support Excel. However, roo might work:

http://roo.rubyforge.org/

According to that page:

This gem allows you to access the content of

Open-office spreadsheets (.ods)
Excel spreadsheets (.xls)
Google (online) spreadsheets
Excel’s new file format .xlsx