tcom Excel activate borders of individual cells

From: Friedrich Lebherz (billdoor_at_web.de)
Date: 11/24/03


Date: Mon, 24 Nov 2003 16:08:22 +0100

Hi everybody,

I have a problem using tcl to write to an Excel work***. I'm trying to add
a top border to a number of cells. The newRange Object in the code fragment
below is a valid object, a can use it to set an alignment or a color to the
given cells. The borders object returned works fine if I set all borderlines
at once ( $borders LineStyle 1 ), the cells have a line around them. When
I try to adress only a single line (here: the top line == xlEdgeTop == 8) :

   set borders [$newRange Borders]
  $borders(8) LineStyle 1

i get the following error message:

can't read "borders(8)": variable isn't array
    while executing
"$borders(8) LineStyle 1 "

So, is there a way to adress just one edge of a cell in Excel?
I have used the Excel VBA Object browser to get the information on the
Borders-Object. It should be no problem changing the properties of a single
edge of a cell using VBA:

Worksheets("Sheet1").Range("A1:G1"). _
    Borders(xlEdgeTop).LineStyle = xlContinuousIs it possible to transfer
this command to tcl??Thank you very much in advance for your help.Many
greetings to allFriedrich