Autoformat writer change the template Simple grid Rows

Hi,
please, can someone help me with issue table autoformat. I want to create addd a new template format.The template in autoformat simple grid rows is nice. But I need the table header row without a backgroundcolor and the first row in the table need a backgroundcolor. Then I need a backgroundcolor for every odd row in the table. There are no options to do this.
Thank you.
Michael

Can that help?

Creating a table in Writer


English documentation

Have you created your table with so-called table style? If so, your case is helpless because these “styles” are equivalent to auto-triggered macros which will overwrite your changes with their own formatting.

The only way to really have your own table look is to create your table manually. If you have several similar tables, copy-paste the first one for the other occurrences to avoid the manual rebuild.

Table styles have a different format for first row and last row. You can create your own style

Create a 3 row table with table style of None.

  1. If you want headings in the first row then select the first row and set paragraph style to Table heading. The paragraph style doesn’t carry over to a new table style but the attributes do.
  2. Colour the middle row the colour you want your alternating rows to be.
  3. You normally want a little space below the table so right click the table and select Properties. In the Table tab set a distance Below the table, e.g. 0.3 cm (1/8") (doesn’t transfer). OK
  4. Add any borders, alignment, etc that you want
  5. Select the table and click Table > Autoformat Styles.
  6. In the dialogue click Add and give the style a relevant name, not pointless like My Grid. OK
  7. Untick any attributes you don’t want. OK

You can now create a new table and apply that style by clicking in the table and double-clicking My Grid in the Table Styles pane of the Sidebar.

It is important to note that the fonts set when you created the table will overwrite those of paragraph styles if they change. If you add or delete a row, the table style will be re-applied. You can update the table style to those specified in Table Contents and Table Heading by selecting the table, pressing Ctrl+M and then, at the top right of the Table Styles pane of the Sidebar, click Styles action and select Update Selected Style
MyGrid.odt (13.0 KB)

@EarnestAl
The My Grid style is not listed under Table > AutoFormat Styles
Did you remove it? Or maybe your LO version works differently?

The version in which I created the Table Style shows My Grid in Table > AutoFormat Styles as well as in Table Styles. I guess it is a list of special macros that is held outside the document in the user profile.

If I open “MyGrid.odt” in another LibreOffice version the entry is not listed in Table > AutoFormat Styles but it still shows in Table Styles. The procedure then is to insert a table, click in it and then double click the table style to apply it.

In general, table styles have their own ideas and need close control. Better to do as @ajlittoz suggests and create a reusable table. You can add them to AutoText as explained here, Unwanted cell background repeating every other row - #8 by EarnestAl

Before asking such a trivial question, I should have searched the user profile first. Mea culpa!

LO seems to store the appropriate data in the autotbl.fmt file.

1 Like