Posted 5 November 2019, 12:58 am EST
Have:
DIm XLBook as new C1XLBook
Dim Sheet as c1ExcelSheet = c1ExcelBook.Sheets(0)
Dim styleBoldCentred as New XLStyle(c1ExcelBook)
With styleBoldCentred
.AlignHorz = XLHorizTextAlign.Center
.AlignVert = XLVertTextAlign.Center
.ForeColor = Color.Black
.SetBorderStyle(XLLineStyleEnum.Thin)
End With
Dim Range As XLCellRange = New XLCellRange(0, 3,0,0)
Sheet.MergedCells.Add(Range)
Range.Style = styleBoldCentred
With Sheet(0, 0)
.Value = "Text"
End With
Without the range the cell renders correctly being centred in the cell.
Using the it renders the text on line 3 i.e. at bottom of the cell not centred.
Any ideas?
Thanks - John