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

This widget could not be displayed.

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

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

Works! :)

This widget could not be displayed.
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.

This widget could not be displayed.

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

459 views 6 6
Join discussion

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