We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

How can I format a Writer table with first and last columns having no special formatting?

asked 2020-12-07 07:05:31 +0200

Jim DeLaHunt gravatar image

updated 2021-05-20 08:33:07 +0200

Alex Kemp gravatar image

I am trying to create a series of tables in a Writer document. The tables have the same format, so I want to use table AutoFormat "styles" on them. The tables have the first row as a special heading row, but the last row is not special. It should be formatted like any other contents row. Also, the first and last columns are not special. They should be formatted like any other column of the table.

When I save my prototype table as a Table AutoFormat Style, I notice that it is displayed with a darker border between the next-to-last column and the last column. When I apply the AutoFormat Style to the actual tables, I notice that that same border is also different (darker, more solid) than for any other interior left or right borders.

I am formatting odd and even rows with different formats, so that my rows will be alternating bands, if that makes a difference.

How can I get LibreOffice Writer to give no special formatting to the first column, last column, and last row?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2020-12-07 10:00:14 +0200

Earnest Al gravatar image

updated 2020-12-07 22:46:25 +0200

Table Styles are less complex than Paragraph Styles. I would avoid the Table AutoFormat Styles and create a new style from a plain table. That way you will know what you are getting and not find something nasty in formatting later on.

  1. Create your table the way that you want it to look
  2. Select the entire table. Open the Styles sidebar and select the Table icon. Click the icon to the right and choose New Style from selection image description
  3. Give a name to your new table Style and OK
  4. Click inside a table that you want formatted with the Style, then double-click the new style in the Styles sidebar and the table will acquire the new format

image description

Cheers, Al

Edit 2020-10-08

I don't like Autoformat. Make your sample table small, just 3 rows (1 for heading, one for odd rows, one for even rows) for ease of formatting, format your table to suit. Create manual alternating rows by selecting the third row, right-clicking and, on the background tab, applying a coloured background, then continue from step 2. The alternating rows will apply to as many rows as you like, the only proviso is that you might need to have an odd number of rows or you might end with two coloured rows at the bottom of the table. You can change the number of columns too. You can subsequently insert rows and the coloured rows will change to remain alternating, just watch the bottom row for two coloured rows together.

In the below picture I formatted a short table with 7 columns, created a style (Test2) from it and applied it as described above to a long table with fewer columns.

image description

Note that a table that is direct formatted will not necessarily show a different style until you clear direct formatting in it by selecting the table and pressing Ctrl+M or Format > Clear Direct Formatting

edit flag offensive delete link more

Comments

Thank you for this answer. I appreciate the screenshots. Are you saying that a "Table Style" (reached from the "Styles" pane, and "New Style from Selection" pulldown menu item) is a different kind of formatting than a "Table Autoformat Style" (reached from the Table… Table Autoformat Styles… menu option)? Or is "Table Style" a different, and better, path for arriving at the same kind of formatting? And how do I implement alternate formatting for even and odd rows? Put another way, if I create a Table Style from a table with a header plus 2-rows, then apply it to a table with a header plus 139 rows, how will Writer apply the Table Style to the target table?

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2020-12-07 20:39:33 +0200 )edit

I appreciate the update. It looks like the Styles pane… Table Styles tab… list of styles is the same thing as the Table menu… AutoFormat Tables… list of styles. It is just a different way of getting to the same functionality. Do I understand that correctly?

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2020-12-09 01:53:18 +0200 )edit

"…the only proviso is that you might need to have an odd number of rows or you might end with two coloured rows at the bottom of the table." This sounds like the Table Styles are being applied so that the last row of the table is being treated specially, not as any other odd or even row. My question is, "How can I get LibreOffice Writer to give no special formatting to the first column, last column, and last row?" It sounds like this approach still leaves in place the special formatting to the last row. Maybe LibreOffice just doesn't offer this kind of control over table formatting.

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2020-12-09 01:56:02 +0200 )edit

I think there is a difference, Autoformat Tables is firstly someone else's Style, you have to remove their formatting to implement yours; better to start with a clean slate. Secondly, Autoformat Tables has been associated with hiding data in the not too distant past.

The proviso is minor, I think it is associated with the way alternating rows are created.

If you do end up with two coloured rows at the end, select the row that is out of sequence, right-click and select Table Properties > Background and click the button None, or choose White colour, or whatever colour you need to match the alternation. Cheers, Al

Earnest Al gravatar imageEarnest Al ( 2020-12-09 08:27:03 +0200 )edit
0

answered 2020-12-07 09:44:50 +0200

ajlittoz gravatar image

I recommend that you drop the so-called table styles and their "autoformat" behaviour. IMHO this feature is not correctly implemented (it is not a style in the traditional Writer sense) and you will experience trouble when editing your tables.

The feature is implemented through what appears to the user as internal macro invocations. These macros get fired at unexpected (but predictable) moments and fully reformat your table, erasing added individual cell formatting.

The table autoformat styles are acceptable if you are satisfied with the provided examples and you only enter data in the cells without customising the presentation. Once again, this is a personal opinion made after unfortunate "surprises". YMMV.

My sophisticated tables are hand-tailored. That is, I insert them with style None and I tune everything with ad-hoc paragraph styles in the cells. This is the only way to be absolutely sure that the formatting will not be incidentally modified on your back by the aforementioned macros (e.g. when adding a row or similar "structural" event).

The only drawback to the fully manual method is the inability to automate the odd/even alternation. If you add a row in the middle of your table, you must then manually change the cell/row background (and eventually the paragraph styles). However, I consider this minor compared to the gained formatting stability.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

edit flag offensive delete link more

Comments

Thank you for the answer. Unfortunately, I really want to automate the odd/even alternation. The table is hard to read without it, because it is long. Also, are "table styles" and "Table Autoformat Styles" the same thing? The answer from @EarnestAI implies that they are different.

Jim DeLaHunt gravatar imageJim DeLaHunt ( 2020-12-07 20:35:08 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-12-07 07:05:31 +0200

Seen: 90 times

Last updated: Dec 07 '20