Can't read Ruby Spreadsheet generated XLS files



Hi.

I have a VERY simple ruby program which uses spreadsheet 0.6.3.1 on Windows
2000 to create an Excel file:

require 'spreadsheet'
Spreadsheet.client_encoding = 'UTF-8'
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet

row = sheet1.row(0)
row[0] = "Date.new 1975, 8, 21"
row[1] = "Time.now.utc"
row[2] = "DateTime.new 2008, 10, 12, 11, 59"
row[3] = "DateTime.civil(y=2009, m=2, d=21, h=19, min=20, s=13, of=0)"
row[4] = "Date.new"
row[5] = "DateTime.now"
row[6] = "Time.new, mit Format"

book.write 'test,' + rand().to_s + '.xls'

Or online at http://askwar.pastebin.ca/1338823

The generated XLS file can be found on
http://public-files.askwar.s3.amazonaws.com/Ruby-Spreadsheet/test%2C0.9583586589
24524.xls

When I try to open that XLS file using 1.8.4 on an ArchLinux system or with
gnumeric-1.9.3-20081017.exe on Windows 2000, then it fails, showing:
"Unsupported file format.". On the openging term of 1.8.4, it shows:

Reading file:///home/askwar/.000%20RDP%20Transfer%20Directory%20000/Ruby-Spreads
heet/test%2C0.958358658924524.xls

(gnumeric:20531): libgsf:msole-WARNING **: failure reading block 16

(gnumeric:20531): libgsf:msole-WARNING **: failure reading block 16
E Unable to open module file "/usr/lib/gnumeric/1.8.3/plugins/psiconv/psiconv".
 E libpsiconv.so.6: cannot open shared object file: No such file or directory

Files created with the old spreadsheet-excel could be opened with Gnumeric.

I don't know if that's something for you or for the Spreadsheet folks.
Is it you,
who's doing something wrong here or is it them? Because of that, you can
find the same question on the spreadsheet forum at
http://rubyforge.org/forum/message.php?msg_id=64870 - as I said, I don't
know who's to "blame" here :)

Thanks a lot,
Alexander
-- 
[ Soc. => http://twitter.com/alexs77 | http://www.plurk.com/alexs77 ]
[ Mehr => http://zyb.com/alexws77 ]
[ Chat => Jabber: alexws77 jabber80 com | Google Talk: a skwar gmail com ]
[ Mehr => MSN: alexws77 live de | Yahoo!: askwar | ICQ: 350677419 ]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]