Why do my tables keep losing all formatting/styling?

I’ve got a wonderfully formatted table… but whenever I add or delete a row, everything reverts to a plain, simple table that doesn’t look like how I need it to. Worst of all, ctrl-z does nothing to reverse the damage - I was forced to reload the document and redo my last few minutes of work (rather than attempt to re-style the entire table).

I don’t understand - am I doing something wrong?

Do you save your work in the native file format of the application you are using or do you save docx?

It’s an odt.

How was your table created? Have you clicked on one of the so-called table “styles”, like Default Table Style or Academic?

If so, your tables are controlled by a set of very jealous macros. They are triggered whenever a modification is made on the table and they reformat it completely. As the macro-formatting is direct formatting, it overrides (masks, erases, hides, … – choose the verb to your taste) any fancy formatting you could have made with styles or even direct formatting.

And since this action is not a user action, it is not entered into the edit history log. Ctrl+Z will do nothing, just like Ctrl+M.

If you want to nicely format a table on user’s criteria, create the table with style None.

That appears to be the problem, thank you! It was set to Default instead of None. Creating a new table that way works fine - but do you know of any way to strip the macro off the existing tables?

Thanks to you as well - saving as docx instead fixed the issue by stripping out the aggressive macros!

LO has a massive quality assurance problem. Selling hard formatting macro code as a new style family is …

2 Likes

Hi All,

The only way to join this thread and answer it seems to be “Suggest a solution” this isn’t a way just more questions and comments on my first use of this forum after joining a few minutes ago.

I am on Windows 10 Version 24.8.2.1 (x86_64)

I have the same problem, if I use the menu to create a table then choose “Default Table Style” as if I choose “None” then I don’t get a table I can see. And if I highlight this invisible table and right click to get a style then the "Default Table Style isn’t available.

As I can’t get the simple table style where the cells are highlighted by a normal thin black line then it isn’t what I want as all the others are not what I want.

Ok that was the first question.

Now a way round the adding rows and having all ones works disappear in an instant (make regular copies, I have dozens of ones so I can go back and pickup up on a workable copy and not lose weeks of work)

OK, so you have formatted cells, added highlight colours changed the font etc. and you want to add a row or three. DON’T use the
Table/Insert/Row below until !! you have highlighted a few rows = maybe the number you want to add.

The go to Table/Insert/Row below and the rows will be added and your precious formatting will not be junked.

HOWEVER do not use CTRL-Z if you make a mistake in adding the new rows as BINGO as then you will lose all your formatting.

This may be a simple work-around but for me it works.

What I would like to see if a new version of Writer that allows you to take a default table i.e. no chosing None and for all formatting to be lost.

Regards…

When you want to apply your own decoration on a table, DON’T use so-called table styles. They aren’t “styles” in the usual Writer acceptance, they are equivalent to a set of macros which get fired as soon as there is a modification in the table (such as new rows or columns).

Default Table Style is a misnomer. It is a member of these “styles”. You bump into these macro triggering events.

The only safe option when you custom-format a table is None “style”. Then everything must be done manually.

The cause of disappearing formatting is the layer inside which the macros do the formatting: this is direct format layer which takes precedence over character and paragraph layers (but note that many attributes of tables are not controlled by paragraph or character styles, like number of columns/rows and their dimensions).

Once you have created a “styled” table, you can’t revert to None style. You can eventually request another one but since None is not a “style”, it is not listed in the Table Styles view of the Navigator.

If you want a stable predictable custom-format, you have no other choice than recreating your tables from scratch.

EDIT

Table “styles” are in fact templates (to be understood in the usual meaning, not to be taken as Writer template files) to be used as is without any attempt to modification. They are provided as a courtesy “one-size-fits-all” feature for those who don’t want to dive into table configuration intricacies. The price to be paid for this convenience is the complete inability to customise formatting because the underlying macros are triggered at unexpected times (from casual user’s point of view) and they “repaint” the full table instead of only the “new” elements.

This is interesting if the chosen model is on-spot for user’s need. Unfortunately, when your preferred layout is different, you can’t base your design on pre-existing “styles” because the macros will revert to initial format. And more unfortunately, there is no correct notion of Writer style offered to user. It looks like ODF (the standard for LO documents) has styles for various components of table but there is no UI to set and apply them.

Click View > Table boundaries to toggle visibility of the grey outline of the table, ticked is visible.
To add default hairline black lines to a table

  1. Select the entire table
  2. click Table > Properties
  3. In the dialogue, select Borders and under Line Arrangement, Presets, click on the icon fourth from the left, tooltip Outer border and all inner lines. OK

Further to @ajlittoz remarks about always using style None, here are are few more points:

  • To “convert” a table with a table style to style None,
    1. Click in the table and then click Table > Convert > Table to text. OK
    2. Select the text that was the previous table and click Table > Convert > Text to table
    3. In the dialogue select None as table format. OK
    4. In the new table, format as desired and replace any previously calculated totals with formulas

Steps 2 and 3 could be replaced by *Select the text that was the previous table and click Table > Insert table. This will convert the text to a table with black cell borders but style None

Thank you both for the information, as and when I will try the above techniques.

I have just tried the “highlight” one or more ROWS (containing text or not) and then and only then go to the Table menu and choose INSERT ROW which again worked in inserting a row WITHOUT removing all formatting. (Don’t hit CTRL-Z to correct a wrong move here as = loss of your formatting again)

The problem I have in general is I have a lot of tables maybe a hundred and saving multiple copies to avoid loss, and then applying a process to convert the table so that formatting loss does not happen will take me years.

As and when I get round to conversions or new tables I will get back here and report.

PS I will try making a donation again, previously when I did this my bank saw a payment to the USA and cancelled it…Happy days :-((

Regards

Burt

Please use a comment bubble to reply unless you really have a solution.


I don’t recommend using tables table styles because of the increased manual adjustments required to maintain them but if you have already committed to table styles then you can work with them. If they are all based on the same table style it will be easier.

  • The content of tables using table styles cannot be updated by changing paragraph styles. All changes to content format must be done within the table style but table styles cannot be directly edited.
  • There are three main parts to a table style; Top row for headings, middle rows with alternating backgrounds, bottom row
  • To edit a table style, you have to direct format the fonts, backgrounds and lines for each part of a sample table. Make changes by rows, not by cells or you might get unexpected results. It might be simplest to create a 5 row table in the same table style and make your settings in that before updating for all.
    1. Select the table
    2. In the Sidebar, above the Styles pane click the right-most icon Table styles
    3. To the right of that is an icon Styles action, select Update selected style. At this point all other tables with the selected table style will update to the new settings.
      TableStyleUpdateSelected

Disadvantages of table styles

  • If you use more than one table style then each table style has to be updated individually.
  • If you need to change the font for the document, instead of just changing Default paragraph style once, you must also edit every used table style
  • You cannot change the name of a table style, the names of the built in styles could become irrelevant as they relate to formatting, not usage. All you can do is to create a new table style with an appropriate name and apply
  • If a different last row is not needed then you will have to colour it manually to match the preceding rows and hope that you won’t end with a wrong pattern of alternating rows

Again more to think about.

When you say “I don’t recommend using tables” is that a blanket just don’t use tables at all?
OR
Is there another approach, otherwise using a table means using another office suite?

Don’t use Answers when you don’t provide a solution. Comments are the closest equivalent to a thread on this site which is not a forum.

Is your text really “tabular data”? Do you use tables to force 2D layout of bits of text?

Writer is first and foremost an application to manage a continuous text flow. You can “decorate” this flow with “objects” like images or tables which are not part of the flow but related to it in various ways.

Use tables when structuring into rows and columns makes sense. Otherwise either find another way to present your data or use a different application (e.g. desktop publishing, like free and open-source Scribus, where you play with boxes you set freely on pages).

Using tables in Writer in fine but you need to be careful. Presently, so-called table styles is a badly implemented feature (personal opinion, you are free to disagree). As long as you accept the models without modification, you’re well-off. But if you want a specific custom layout or formatting, you must design your table manually because of the spurious macro triggering at unexpected times inherent to the table “styles”.

So, the “I don’t recommend” applies both to the non-rational adoption of tables for something which is not intrinsically tabular, and to the apparent ease of table “styles”.

Re

Don’t use Answers when you don’t provide a solution. Comments are the closest equivalent to a thread on this site which is not a forum .

Not exactly easy to see that the little icons are relevant to reply until AFTER one has been communicating a little … maybe it would be better if the little icons were replaced by buttons i.e. share Bookmark and Suggest a solution.

The fact that “This is not a forum” seems a little “tedious” how exactly does one work out the difference ?
It is possible that I missed this information previously?

Sorry, that was a typo, it was table styles but somehow the centre got deleted during editing.

Table are perfectly valid means of laying out data.

BTW. It seems that the next releases of LibreOffice might enable a user to turn off table styles for existing tables, see tdf#126008

Appreciated :slight_smile:
I would welcome the change, for existing, atm I am using an alternative office suite, or when adding a block of rows (1+) I use the approach of highlighting how many rows I want and then the menu option. This just adds rows (or columns I guess) without destroying formatting colours font changes etc.

PS I managed a “comment” (reply) using the tiny icons bottom right.