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,298,766
Community Members
 
Community Events
165
Community Groups

Can I use Table Transformer to transpose each table before using Table Excerpt Include?

Edited

I saw a way to use Table Transformer to transpose the table after using Table Excerpt Include in this discussion: https://community.atlassian.com/t5/Confluence-questions/Select-table-rows-in-other-page/qaq-p/1759006

Is there a way to do the opposite, i.e., transpose each table first then use Table Excerpt Include? Thank you.

For example, the 2 tables in Table Excerpt are:

A | x1              A | x2

B | y1              B | y2

C | z1              C | z2

And I'd like to have the result looks like

A  |  B  |  C

x1 | y1 | z1

x2 | y2 | z2

It seems the Table Excerpt Include doesn't support merging table by first column but only by first row. If it can support merging table by first column, that can be the solution as well.

1 answer

1 accepted

Hi @Pei-ju Hsu ,

You may implement the following steps:

Fri 1-1.png

Here we have your tables that are collected with the help of the Table Excerpt Include macro:

Fri 1-2.pngThe last step is to merge your transposed tables via the Table Transformer macro.

Here we choose the standard Merge preset:

Fri 1-3.pngAnd here check the Transpose source tables option:

Fri 1-4.png

And here is your result:

Fri 1-5.png

Hope this helps your case.

Hi Katerina,

Thank you for the quick response. Yes, this is what I'm looking for. I test it again and it works well. Thank you!

A small feedback -- when I was testing the tool the first time, I was using the case when the first rows of 2 tables are the same (like below). In this case the tool is merging 2 tables by first row but not first column by default.

A | x1              A | x1

B | y1               B | y2

C | z1               C | z2

It is because the Merge preset is chosen by default for the Table Transformer macro (it comes first in line), so the first row (similar for the two tables) was misinterpreted as a header row.

Thank you for reaching out, I'm glad that everything works now.

Hi Katerina,

Thank you again for your help. I have a follow up question:

I'd like to add "Show page meta data: Page" in Table Excerpt Include macro. How to make it work with Table Transformer like the following?

 

Page   |  A  |  B  |  C

page1 | x1 | y1 | z1

page2 | x2 | y2 | z2

 

Thank you,

Pei-ju

You won't be able to construct a beautiful table with the page meta data if you need to transpose tables as we performed for your case - you tables will be messed up.

Create source tables horizontally

A |B  |C

x1|y1|z1

Collect them with the Table Excerpt Include macro (check the "Show as a report table"  option) and choose to show any meta data you want.

Everything will be shown beautifully and you even won't need the Table Transformer macro at all.

The table looks perfect until I add a page name, which should just appear as a the first column. Is this on the roadmap to be fixed? 

Hi @eaugust_oxio_io ,

If you mean that the table with meta data coming after the Table Excerpt Include macro has beautifully merged cells (the first table on the screenshot) and after the Table Transformer macro the cells are splitted (the second table on the screenshot), then it's not a bug: the Table Transformer macro is based on the AlaSQL library and refers to every table cell as an entry of a SQL database. So it can't operate with any merged info.

Wed 13-1.png

So try not to use the Table Transformer macro on top of the Table Excerpt Include macro if it is not necessary - check the Show as a report table option in the Table Excerpt Include macro to get a combined report.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

233 views 1 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you