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


On 18 May 2010 12:22, Pen Ttt <myocean135 / yahoo.cn> wrote:

> 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?
> --
> Posted via http://www.ruby-forum.com/.
>
>
--
A transistor protected by fast acting fuse will protect the fuse by blowing
first