Change table body row to table header row?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Finner
Propeller Head
Posts: 49
Joined: Tue Jul 26, 2016 9:51 am

Change table body row to table header row?

Post by Finner »

Is there an easy way to change a table body row to a table header row in Flare 2017? I imported a Word file without automatically designating the first row as the header row, and now I have a lot of table rows to convert. FYI, I am using a custom table style.

Thank you!
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Change table body row to table header row?

Post by devans »

I don't know if there is a way to bulk update your tables. But all you have to do to change a normal table row to a header row is select it, then apply "th" style from the Style drop down box.
Finner
Propeller Head
Posts: 49
Joined: Tue Jul 26, 2016 9:51 am

Re: Change table body row to table header row?

Post by Finner »

I'm sorry--can you be more specific? I select the row and then go to which menu and submenu at the top? If I go to Style under Home, I do see th and td, but when I select th it doesn't get formatted as specified in my Tables stylesheet.
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Change table body row to table header row?

Post by devans »

You forced me to do some research! The header row only seems to apply to table styles, e.g. row colours and borders. You still have to apply the paragraph style to the text that sits in the header row manually.

Hopefully somebody else can shed more light on this.
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Change table body row to table header row?

Post by GregStenhouse »

In addition to <td> becoming <th>, the row <tr> also needs to appear in a separate <thead> (hopefully that makes sense!) Something like:

Code: Select all

<thead>
  <tr>
    <th>Heading</th>
    <th>Heading</th>
    <th>Heading</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Body</td>
    <td>Body</td>
    <td>Body</td>
  </tr>...
Unfortunately the only way of achieving that via the UI is to access table properties, set header rows to 1, then cut and paste the body row to the header row. Not ideal when you have a lot of tables to convert. It may be worth looking into search and replace across files.
paintedturtle
Propeller Head
Posts: 88
Joined: Wed May 25, 2016 3:35 pm

Re: Change table body row to table header row?

Post by paintedturtle »

Finner wrote:I'm sorry--can you be more specific? I select the row and then go to which menu and submenu at the top? If I go to Style under Home, I do see th and td, but when I select th it doesn't get formatted as specified in my Tables stylesheet.
You could also open up your table style, click on "Apply Style" under the heading tab (third from the right), and then choose the topics to apply the table style to. This is of course assuming a majority of your tables have similar styles.
You can set styles in the Header part of the stylesheet, but I don't remember if it sets the first row as header when you do the "Apply Style" button. (Most of my tables don't have headers for various reasons.)
Hope that helps!
~Sarah
You do not have the required permissions to view the files attached to this post.
Technical Writer using and experimenting with Flare version 12.0.5991.
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Change table body row to table header row?

Post by devans »

That's a great tip, Sarah, thank you. I'll file that one away. :D

Dora
Post Reply