Bugs: Browse | Submit New | Admin

[#25968] No such file or directory - Workbook

Date:
2009-05-20 16:56
Priority:
3
Submitted By:
Don Park (donpdonp)
Assigned To:
Nobody (None)
Category:
workbook
State:
Closed
Summary:
No such file or directory - Workbook

Detailed description
Certain .xls files throw this error:

>> Spreadsheet.open "/home/donp/work/jbb/docs/CUSTREL STORE PROFILE REPORT(3).xls"
Errno::ENOENT: No such file or directory - Workbook
	from /usr/lib/ruby/gems/1.8/gems/ruby-ole-1.2.8.2/lib/ole/storage/file_system.rb:125:in `dirent_from_path'
	from /usr/lib/ruby/gems/1.8/gems/ruby-ole-1.2.8.2/lib/ole/storage/file_system.rb:158:in `open'
	from /usr/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3.1/lib/spreadsheet/excel/reader.rb:1100:in `setup'
	from /usr/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3.1/lib/spreadsheet/excel/reader.rb:120:in `read'
	from /usr/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3.1/lib/spreadsheet/excel/workbook.rb:32:in `open'
	from /usr/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3.1/lib/spreadsheet.rb:62:in `open'
	from /usr/lib/ruby/gems/1.8/gems/spreadsheet-0.6.3.1/lib/spreadsheet.rb:68:in `open'
	from (irb):3

the error happens here:

1097:  def setup io
1098:    @ole = Ole::Storage.open io
1099:    @workbook = Workbook.new io, {}
1100:    @book = @ole.file.open("Book") rescue @ole.file.open("Workbook") 

other .xls files open file. any idea whats wrong?

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-07-03 18:48
Sender: Hannes Wyss

Fixed in 0.6.4
http://rubyforge.org/forum/forum.php?forum_id=33463
Date: 2009-07-03 13:33
Sender: Hannes Wyss

Thanks for the report and the hint! A slightly modified fix is
in the current HEAD:
http://scm.ywesee.com/?p=spreadsheet;a=commit;h=cf398b121a929cda4
def6a2953423919c6224125

I'll release an updated gem as soon as possible.

cheers
Hannes
Date: 2009-05-20 17:34
Sender: Don Park

some spreadsheets use an OLE directory entry of
"BOOK".

patch:
1100:    @book = @ole.file.open("Book") rescue 
@ole.file.open("BOOK") rescue
@ole.file.open("Workbook")
 

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2009-07-03 18:48hwyss
resolution_idNone2009-07-03 18:48hwyss
close_date2009-07-03 18:482009-07-03 18:48hwyss