Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 23834
BY: Italo Vega (italo)
DATE: 2007-06-19 04:57
SUBJECT: RE: Consecutive cells problem

 

Hi Thomas,

This is my test case:

>>>>>>>>>>>>>>>>>>>>>
require 'rubygems'
require 'roo'

def printCells( oo, row )
puts "Cells values in row #{row}:"
print oo.cell(row, 1), ":", oo.celltype(row, 1), "\n"
print oo.cell(row, 2), ":", oo.celltype(row, 2), "\n"
print oo.cell(row, 3), ":", oo.celltype(row, 3), "\n"
puts
end

oo = Openoffice.new("simple_spreadsheet.ods")
oo.default_sheet = oo.sheets[0]
puts oo.officeversion
puts

(1..5).each { |row| printCells( oo, row ) }

# Openoffice.Calc:
#~ 1 1 1
#~ 1 2 1
#~ 1 3 1
#~ A A A
#~ 1.0% 1.0% 1.0%
<<<<<<<<<<<<<<<

Execution result:
>>>>>>>>>
1.0

Cells values in row 1:
nil:nil
nil:nil
1:string

Cells values in row 2:
1:string
2:string
1:string

Cells values in row 3:
1.0:float
3.0:float
1.0:float

Cells values in row 4:
nil:nil
nil:nil
A:string

Cells values in row 5:
0.01:percentage
0.01:percentage
0.01:percentage

default formats are encoded in ISO-8859-1
<<<<<<<<<<<<<<<<<<<<<<<

(How could I send you my file "simple_spreadsheet.ods"?)

Thank you, Italo


Thread View

Thread Author Date
Consecutive cells problemItalo Vega2007-06-18 17:41
      RE: Consecutive cells problemThomas Preymesser2007-06-18 22:31
            RE: Consecutive cells problemItalo Vega2007-06-19 04:57
                  RE: Consecutive cells problemThomas Preymesser2007-06-19 10:19
                        RE: Consecutive cells problemItalo Vega2007-06-19 13:08
                  RE: Consecutive cells problemThomas Preymesser2007-06-19 14:45
                        RE: Consecutive cells problemItalo Vega2007-06-19 19:06
                              RE: Consecutive cells problemThomas Preymesser2007-06-19 19:24

Post a followup to this message