zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

Opening file saved with Calc 5.1.3.2 results in Ole::Storage::FormatError: OLE2 signature is invalid #176

Closed matkoniecz closed 8 years ago

matkoniecz commented 8 years ago

Libre Office:

Version: 5.1.3.2
Build ID: 1:5.1.3~rc2-0ubuntu1~trusty1
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; 
Locale: pl-PL (en_US.UTF-8)

Lubuntu 32bit

ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-linux-gnu]

following https://github.com/zdavatz/spreadsheet/blob/master/GUIDE.md results in:

book = Spreadsheet.open "test.ods"
Ole::Storage::FormatError: OLE2 signature is invalid
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:378:in `validate!'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:370:in `initialize'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:112:in `new'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:112:in `load'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:79:in `initialize'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:85:in `new'
    from /home/mateusz/.gem/ruby/2.3.0/gems/ruby-ole-1.2.12/lib/ole/storage/base.rb:85:in `open'
    from /home/mateusz/.gem/ruby/2.3.0/gems/spreadsheet-1.1.2/lib/spreadsheet/excel/reader.rb:1282:in `setup'
    from /home/mateusz/.gem/ruby/2.3.0/gems/spreadsheet-1.1.2/lib/spreadsheet/excel/reader.rb:140:in `read'
    from /home/mateusz/.gem/ruby/2.3.0/gems/spreadsheet-1.1.2/lib/spreadsheet/excel/workbook.rb:32:in `open'
    from /home/mateusz/.gem/ruby/2.3.0/gems/spreadsheet-1.1.2/lib/spreadsheet.rb:65:in `open'
    from /home/mateusz/.gem/ruby/2.3.0/gems/spreadsheet-1.1.2/lib/spreadsheet.rb:71:in `open'
    from (irb):8
    from /usr/bin/irb:11:in `<main>'
zdavatz commented 8 years ago

How was the file created? Did you save the file as .xls with LibreOffice?

matkoniecz commented 8 years ago

How was the file created?

Open Calc, save empty file.

Opening xls files produced by this Calc version works fine.

zdavatz commented 8 years ago

In what format did you save the file?

matkoniecz commented 8 years ago

book = Spreadsheet.open "test.ods"

ods

zdavatz commented 8 years ago

ods Format ist not yet supported as it is not a Microsoft Format.

matkoniecz commented 8 years ago

Note that it is Microsoft Excel compatible spreadsheet (Excel can open it). And this library claims to be capable of opening "Microsoft Excel compatible spreadsheets".

matkoniecz commented 8 years ago

If it is capable of opening only xls/xlsx then "xls/xslx" would be probably better term than "Microsoft Excel compatible spreadsheet".

zdavatz commented 8 years ago

xlsx is not supported.