Adding a Border to cells in Excel

My app opens Excel, places data into cells then formats those cells. I am trying put a bottom border on row of cells, but cannot find any reference code in Xojo.
Does anyone know how to do this?


Is this using MBS XL Plugin?
Because there we do have border functions on the XLFormatMBS class.

I haven’t time to dig more into this, but look at something along these lines:


It is not using the MBS XL Plugin. I wasn’t aware of this plugin. How do I add it?

And … LineStyle = 7 places a box around the range of cells. I will work this and see what # equates to the bottom border.

OK some progress!


I found a list of the values here:

$xlAutomatic=-4105 $xlBottom = -4107 $xlCenter = -4108 $xlContext = -5002 $xlContinuous=1 $xlDiagonalDown=5 $xlDiagonalUp=6 $xlEdgeBottom=9 $xlEdgeLeft=7 $xlEdgeRight=10 $xlEdgeTop=8 $xlInsideHorizontal=12 $xlInsideVertical=11 $xlNone=-4142 $xlThin=2 $xlMedium = -4138 $xlThick = 4

You probably want 9.

EDIT - also

Hi Peter,

I’m wondering if it also has something to do with the version of Excel I am testing with (2000). The value of 9 places a double lined box around all cells in the range. I will test the code on another pc that has a newer version of Excel on it. Thanks for helping.

Be sure to see the difference between the Borders.Value and the Borders.Linestyle.Value.

MBS XL Plugin is for reading/Writing excel files without excel installed.
Crossplatform and for old/new Excel file format.