[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: drawing borders in excel

Bernard Kenik

11/30/2006 1:14:00 AM

Okay quick update... I figured out how to change the color of my border
and it shows up:

worksheet.Range("a#{currRow}:d#{currRow}").Borders['ColorIndex'] = 3

Buuuut when I try to change the line weight or style I get an OLE error.
Neither of these work:

worksheet.Range("a#{currRow}:d#{currRow}").Borders['LineStyle'] =
'xlContinuous'
worksheet.Range("a#{currRow}:d#{currRow}").Borders['Weight'] = 'xlThick'

The OLE error says unable to set the Weight property of the Borders
class. Same for Line Style. This makes me think that maybe the values I
am trying to set it to are incorrect since this also happens when I try
to change the color index to something like 99. So I believe I am
accessing the property correctly but not setting the correct value,
however all the examples I could find use those values.
Any ideas?


#####################################################################################################
place the following lines in your script after the line where you open the excel application



module ExcelConst
end
WIN32OLE.const_load(excel, ExcelConst)

then you can use XlThick and XlContinuous as constants .... note buene: capital X not lowercase

fairly sure that quotes are not needed

ps XlThick = 4, XlContinuous = 1





2 Answers

GaryTheNoTrashCougar

11/17/2010 8:51:00 PM

0

On Nov 17, 2:53 pm, skbrothers <skbroth...@comcast.net> wrote:
> Purple the best color in the visible spectrum of light.
>
> Outside of visible I'm partial to UV, with IR running a close second.
>
> Steve

I am going to agree that the best color is just on the visible side of
UV.
--Scott

Bill

11/17/2010 9:11:00 PM

0

For the record -- Congo rules!