I’m having issues with changing cell border. I can retrieve values nicely, and write them but it will not be saved into the cell.
I tried even simple example to no luck:
Sub TestFormatCellBorders Dim oBL2 As New com.sun.star.table.BorderLine2 Dim oSht As Object, oCelB As Object oSht = ThisComponent.Sheets.getByName("Sh1") oBL2.Color = RGB(50, 100, 200) oBL2.LineStyle = 0 oBL2.LineWidth = 44 oCelB = oSht.getCellRangeByName("M14").TableBorder2 If MsgBox ("RightLine Width =" & oCelB.RightLine.LineWidth, 1) = 2 Then Exit Sub ' Set oCelB.RightLine = oBL2 oCelB.RightLine.LineWidth = 44 oCelB.BottomLine = oBL2 If MsgBox ("RightLine Width =" & oCelB.RightLine.LineWidth, 1) = 2 Then Exit Sub End Sub
When it starts LIne width is 0, after change it is 44 as it should be, but it doesn’t change in the worksheet, and next time I ran macro it is displayed as 0 again