Forum: Ruby Printing problems with 'spreadsheet' gem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb880dd8c8c209924ebb57edbb4fcd06?d=identicon&s=25 Jim Burgess (jim_in_germany)
on 2009-01-16 17:06
Hi,
I'm using the 'spreadsheet' gem to generate a number of invoices
automatically.
In itself that works great, but when I come to print the files I have
generated I get the error message "Microsoft Excel did not find anything
to Print".
Has anyone else run up against this problem and does anyone know how to
get round it.
Oh, and by the way, I also generated a one cell Excel file thus:

require 'spreadsheet'
Spreadsheet.client_encoding = 'UTF-8'
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1[0,0] = 'Hello'
book.write 'C:/Dokumente und Einstellungen/Jim/Desktop/new.xls'

and still had the same problem.
This was just to check I hadn't done something weird in my code.
9d0207c91dd4cbc7e7b5f5be98c85e2b?d=identicon&s=25 Hannes Wyss (spreadsheet)
on 2009-01-16 19:30
(Received via mailing list)
Jim,

On Fri, Jan 16, 2009 at 5:05 PM, Jim Burgess <mr_nice66@yahoo.com>
wrote:
> Hi,
> I'm using the 'spreadsheet' gem to generate a number of invoices
> automatically.
> In itself that works great, but when I come to print the files I have
> generated I get the error message "Microsoft Excel did not find anything
> to Print".
> Has anyone else run up against this problem and does anyone know how to
> get round it.

Yup, that was a known problem until a couple of days ago. Fixed in
0.6.3.

hth

best,
Hannes
Cb880dd8c8c209924ebb57edbb4fcd06?d=identicon&s=25 Jim Burgess (jim_in_germany)
on 2009-01-16 19:54
Hi Hannes,

I updated the gem and now it works like a charm.
Thanks a million.

Jim.

P.S. One more question I have regarding the spreadsheet gem - how do you
apply a thick border to a cell?

format = Spreadsheet::Format.new :color => :black, :weight => :bold,
:size => 12, :align => :left, :border =>1

will just give you a thin border.
I tried increasing the number, stipulating :thick as a parameter, but no
joy
This topic is locked and can not be replied to.