Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Conditional Formatting For Confluence Tables with Multiple Header Rows

majd makhoul December 22, 2022

Hi,

I have the table below with two header rows, and I want to color the table cells based on their values:

  • Green for Pass or 0
  • Grey for NULL or -
  • Red Otherwise

Snip20221223_36.png

How do I do that? I tried using SQL query but it looks like SQL doesn't support tables with multiple header rows so I'm not sure how to do this. If I write:

SELECT T1.'Column0' from T1

It will print the table and completely ignore Column1 like below:

Snip20221223_35.png

I'd appreciate any advice!

Thanks

1 answer

3 votes
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 23, 2022

Hi @majd makhoul,

The Table Transformer macro considers your source table as a basic SQL database, so multiple-row headers are transformed into long one-row headers. Please see the example below:

Fri 6-1.png

SELECT * FROM T*

Fri 6-2.png

As you can see, you can’t refer to your column as “T1.Column 0”, now you have two columns “T1.Column 0 Column 1” and “T1.Column 0 Column 2”. These options will be given to you in the autocomplete (when you type in “T1.” and wait for the hints). I guess that you typed in “T1.Column 0” manually that is not correct.

If you don’t want long headers and need to use multiple-row headers, you may use the Table Spreadsheet macro. It has all the basic Excel functionality (and conditional formatting as well).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events