to_csv not working with ODS when there is a boolean cell
LocoDelAssembly opened this issue · 1 comments
LocoDelAssembly commented
The problem seems to be at:
Line 46 in 3ed05e1
However it works if the cell rather than having "TRUE" as boolean type cell it has "=TRUE()". Would break something if :boolean
was handled just as if it was a formula?
2.7.1 :036 > ap CSV.new(Roo::Spreadsheet.open('./test-fail.ods').to_csv).first
Traceback (most recent call last):
2: from (irb):35
1: from (irb):36:in `rescue in irb_binding'
NoMethodError (undefined method `sheet_for' for #<Roo::OpenOffice:0x0000557c95ac7878>)
Did you mean? sheet
2.7.1 :037 > ap CSV.new(Roo::Spreadsheet.open('./test-pass.ods').to_csv).first
[
[ 0] "1",
[ 1] "1.3",
[ 2] "a",
[ 3] "25/10/2020",
[ 4] "2020-10-25",
[ 5] "3324.23",
[ 6] "23423",
[ 7] "0.05",
[ 8] "01:32:00",
[ 9] "10:39:00",
[10] "1.75",
[11] "true",
[12] "sarasum"
]
=> nil
Samples: test.zip
wu-lee commented
Thanks - I am seeing exactly this issue too.