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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,587
Community Members
 
Community Events
176
Community Groups

Conditional Formatting For Confluence Tables with Multiple Header Rows

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

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

Atlassian Community Events