How to change the default border color that is used when adding new borders?

When I add borders to a cell they are displayed in black. I can apply a different color afterwards but it’s much more work to always manually change the color.
So, how do I change the default border color?

I tried to change the color in:
Cell Style: Default > Borders > Line > Color
but the color is always changing back to black. Probably this is because in my Default Cell Style there are no border lines assigned and I want to keep it like that.

Do you have any suggestions?

Thank you!


Edit: What I want to achieve is to have all border lines that I might apply in the future to be colored green by default instead of black. If there is a way to achieve that I would be happy to know it.


LibreOffice Version: 7.0.4.2
Linux 5.10 / Debian 11

As you have already noticed yourself, your statements are somewhat contradictory. Therefore, it is always advisable to simply describe what exactly you would like to achieve and not to describe where you were unsuccessful but would like to receive conditions (usually no borders).

If I understand correctly, you want to border certain cells in a different color and leave the other cells as they are, right?

The best way to achieve this is to create one (or more, per color One) new cell styles.

Right-click on the cell style “Default” and choose New....
In the dialog “Cell style” enter a name in the tab “Organize”.
In the “Border” tab, select the line style, color and width, then click the “Set All for Borders” icon at the top and OK.

Now select the cells that should get a different border color.
Double-click on the new cell style, done.

If it was the wrong cells, select them again and double-click on the “Default” cell style.

See also: Cell Styles in Calc


PS: The cell style " Default " should remain untouched.
Changes in it will affect the styles below it in the hierarchy.


EDIT 2021-11-02, 18.40 MEZ

Yes, this is also possible, but via a different way.
The following procedure:
Mark a normal cell area of 4 x 4 cells.
Select in the Format|cells menu and set the color and width of the line in the “Border” tab of the “Format Cells” dialog and click on the “Set All four Borders” icon and OK.
Leave the cell area 4 x4 selected.
Choose Menu Format>AutoFormat... and in the dialog “AutoFormat” the button Add.
Enter a name and OK + OK.

Select any cell range 4x4 or larger.
Go to menu Format>AutoFormat....
In the “AutoFormat” dialog select the name of the new AutoFormat template and click OK, done.

See also:
AutoFormat Table Styles

2 Likes

Thanks a lot for your suggestion!

I created different Cell Styles for all the different border types and instead of applying the border I want using the “Top Bar” I can apply it using the Cell Style “Borders Green” (for all four Borders) or one of the other ones (“Left”, “Left & Right”, …) depending on what I want.

LibreCalc_Styles_Borders_Green

I will try that out & think that it will be useful for me.

1 Like

Is it possible to use this method also for the other border style option that I can get in the “Top Bar”?

For example if I have a range of cells and only want the outer cells to have border lines:

LibreCalc_Border_Options

See my edited answer above.

Thanks again for you reply. It’s nice to learn about AutoFormat. :slight_smile:

For what I want to achieve it seems a bit complicated for me though. I think that assigning the border style & the border color in the next step using the “Top Bar” will be faster. But I will give it a try.