Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openoffice files can not be open #12

Closed
gorn opened this issue Feb 3, 2013 · 5 comments
Closed

Openoffice files can not be open #12

gorn opened this issue Feb 3, 2013 · 5 comments

Comments

@gorn
Copy link

gorn commented Feb 3, 2013

When i try to read files from test/files directory like so:

require 'roo'
puts Roo::Spreadsheet.open('Bibelbund.xls').inspect
puts Roo::Spreadsheet.open('Bibelbund.ods').inspect

I get at error at trird line. xls file is read normally, reading and inspecting ods file gives this error:

/var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/generic_spreadsheet.rb:703:in `validate_sheet!': Error: sheet 'nil' not valid (ArgumentError)
    from /var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/openoffice.rb:327:in `read_cells'
    from /var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/openoffice.rb:203:in `to_s'
    from manip.rb:14:in `inspect'
    from manip.rb:14:in `<main>'
@pabloh
Copy link
Contributor

pabloh commented Feb 3, 2013

Does it work fine at Roo 1.10.1?

2013/2/3 Jakub Tesinsky notifications@github.com

When i try to read files from test/files directory like so:

require 'roo'
puts Roo::Spreadsheet.open('Bibelbund.xls').inspect
puts Roo::Spreadsheet.open('Bibelbund.ods').inspect

I get at error at trird line. xls file is read normally, reading and
inspecting ods file gives this error:

/var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/generic_spreadsheet.rb:703:in validate_sheet!': Error: sheet 'nil' not valid (ArgumentError) from /var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/openoffice.rb:327:inread_cells'
from /var/lib/gems/1.9.1/gems/roo-1.10.2/lib/roo/openoffice.rb:203:in to_s' from manip.rb:14:ininspect'
from manip.rb:14:in `

'


Reply to this email directly or view it on GitHubhttps://github.com//issues/12.

@Kagetsuki
Copy link
Contributor

I tested this and can confirm:

ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/generic_spreadsheet.rb:703:in `validate_sheet!': Error: sheet 'nil' not valid (ArgumentError)
    from /home/zero/.rvm/gems/ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/openoffice.rb:327:in `read_cells'
    from /home/zero/.rvm/gems/ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/openoffice.rb:203:in `to_s'
    from rootest.rb:3:in `inspect'
    from rootest.rb:3:in `<main>'

This occurs on inspect. I removed the inspect and just tried to read a cell and got:

ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/generic_spreadsheet.rb:703:in `validate_sheet!': Error: sheet 'nil' not valid (ArgumentError)
    from /home/zero/.rvm/gems/ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/openoffice.rb:327:in `read_cells'
    from /home/zero/.rvm/gems/ruby-1.9.3-p362/gems/roo-1.10.2/lib/roo/openoffice.rb:87:in `cell'
    from rootest.rb:3:in `<main>'

So I tried explicitly selecting the first sheet and get the same validate sheet error. XLS version of the same file works fine.

@Empact
Copy link
Contributor

Empact commented Mar 14, 2013

Could you check whether this problem still exists in v1.11.0, which was just released?

@Kagetsuki
Copy link
Contributor

Just tested 1.11.0 in ruby 2.0.0p0 - everything looks fine in my test but as I recall it was a few specific sheets that gave me issues. The sheet I tested I -think- was one of those, but I may be mistaken. Consider the issue solved and close it I say.

Thanks for the improvements Empact. Roo is fantastic. Right now I'm working on a converter to output in xls and ods, including the option to use template spreadsheets. I'll give you a heads up when I release it?

@Kagetsuki
Copy link
Contributor

@Empact I think this should be closed as it is fixed.

@Empact Empact closed this as completed May 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants