Skip to main content

[archive] Excel and borders

  • October 4, 2007
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 04 October 2007]

I am having difficulty in finding how to set specific borders on an excel cell - i.e. top, bottom,left,right.

To set a border around the cell is
MODIFY olWrkSh Range(w-full-range)::BorderAround (
xlContinuous
xlthin
xlAutomatic).

But I cannot find how to set or use the equivalent of
Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic

The class range does not have these methods.


Can anyone Help?

2 replies

[Migrated content. Thread originally posted on 04 October 2007]

I am having difficulty in finding how to set specific borders on an excel cell - i.e. top, bottom,left,right.

To set a border around the cell is
MODIFY olWrkSh Range(w-full-range)::BorderAround (
xlContinuous
xlthin
xlAutomatic).

But I cannot find how to set or use the equivalent of
Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic

The class range does not have these methods.


Can anyone Help?
Borders is a property of the range object.
This return a border object. This object is a collection which default parameter is its itemizer.

So, if you modify your above to:

77 olBorders HANDLE OF BORDERS.
...
INQUIRE olWrkSh Range(w-full-range)::Borders IN olBorders.
MODIFY olBorders @Item(xlEdgeTop)::LineStyle = xlContinous.

You should be all set.

[Migrated content. Thread originally posted on 04 October 2007]

I am having difficulty in finding how to set specific borders on an excel cell - i.e. top, bottom,left,right.

To set a border around the cell is
MODIFY olWrkSh Range(w-full-range)::BorderAround (
xlContinuous
xlthin
xlAutomatic).

But I cannot find how to set or use the equivalent of
Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic

The class range does not have these methods.


Can anyone Help?
Borders is a property of the range object.
This return a border object. This object is a collection which default parameter is its itemizer.

So, if you modify your above to:

77 olBorders HANDLE OF BORDERS.
...
INQUIRE olWrkSh Range(w-full-range)::Borders IN olBorders.
MODIFY olBorders @Item(xlEdgeTop)::LineStyle = xlContinous.

You should be all set.