Show x-last columns of a confluence table

Hello community,

I'm searching for a way to shorten a confluence table in the "view" mode.


We have some pages with huge confluence tables, lets say 40 columns. But we only want to show the last 10 columns. 

How can I achieve this? 


We cannot use the HTML add-on from Bobswift, due to a serious security (XSS) vulnerability witch comes with the Add-on.


3 answers

1 accepted

1 vote
Answer accepted

Dirty but good, we're using an add-on which has a css macro.

td:nth-last-child(+n+6) {
display: none;

Works! :)

1 vote
Thomas Schlegel Community Champion Oct 11, 2017

Hi Jan,

I think, this should be possible with a user macro that is filtering columns. I've done something similar, filtering rows with JQuery. Should work with columns too, I think. I've written an article about that here:

Viele Grüße um die Ecke


Moin Thomas,

I'll try that one, thanks!

Beste Grüße zurück ;)


Davin Studer Community Champion Oct 11, 2017

Using a user macro you could actually do it without having to resort to jQuery. Look into the nth-child CSS selector and display: none.

Thanks Davin, exactly that worked for me.

Hello Jan,

You can use Table Filter macro for this purpose:

  1. Wrap your table with Table Filter macro.
  2. Add a Hide column filter. You can find it easier to add filter while viewing the page.
  3. Choose columns to hide (or set filter inverse and choose columns to show).
  4. Don't forget to save changes.

You can try it right now on the demo site.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

276 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you