I tried to use the horizontal and vertical border lines when creating border lines but it was not successful when selecting a rage of cells. Applying lines as vertical and horizontal didn't seem to have any affect to either as one might expect on inside borders when selecting a range. The work around it seems is to select each cell and apply a outline to them all singularly. That causes a performance drop if there are a lot of cells. Does anyone else know how to apply borders to inside cells within a range or does everyone handle it when the write a value to a cell regardless if it has any value or not?
Would like to see a method to create inside borders like Excel does - Community / GemBox.Spreadsheet Feature Request - GemBox Support Center
Comments (2)
Rob Sherratt
Mario - GemBox
Hi,
Currently there is no enum for inside borders so this is essentially a feature request for that enum.
Also please see the MultipleBorders enum's help page:
https://www.gemboxsoftware.com/spreadsheet/help/html/T_GemBox_Spreadsheet_MultipleBorders.htm
Notice that it's a flag enum and a corresponding values for each of them are provided on that link.
For example the "Horizontal" (value of 3) is equal to "Top" and "Bottom" (value of 1 and 2).
Regards,
Mario
GemBox d.o.o.
Currently there is no enum for inside borders so this is essentially a feature request for that enum.
Also please see the MultipleBorders enum's help page:
https://www.gemboxsoftware.com/spreadsheet/help/html/T_GemBox_Spreadsheet_MultipleBorders.htm
Notice that it's a flag enum and a corresponding values for each of them are provided on that link.
For example the "Horizontal" (value of 3) is equal to "Top" and "Bottom" (value of 1 and 2).
Regards,
Mario
GemBox d.o.o.
Private Sub SetCellBorders(range As CellRange, color As SpreadsheetColor, lineStyle As LineStyle)
range.Style.Borders.SetBorders(MultipleBorders.All, color, lineStyle)
End Sub