How to build a table from other tables
Asked by Tim Freehill:

I have a series of status pages that each contain a table of data, such as project milestones. I'd like to have an additional page that pulls the rows from each of the tables on those individual pages and builds a master table that contains all of them in a single table, using something like a multi-excerpt type macro. I do not have access to the Table-excerpt macro, however, so I need a solution that doesn't use it.

Any ideas?

tim


Answers:
author: Shannon S
body: Hi Tim,

This is not possible in Confluence without a 3rd party add-on. Have a look at this past question for a list of suggestions:

* [Include Table Data in Other Tables](https://community.atlassian.com/t5/Answers-Developer-Questions/Include-Table-Data-in-Other-Tables/qaq-p/469819)

Otherwise, you might be able to get the [Page Properties Report](https://confluence.atlassian.com/doc/page-properties-report-macro-186089616.html) macro to work for your needs, but it would need to pull from a single [Page Properties](https://confluence.atlassian.com/doc/page-properties-macro-184550024.html) macro on another page.

Regards,

Shannon

comments: author: Tim Freehill
body: Thanks, Shannon - you probably saved me hours of thrashing!

tim


author: Craig Castle-Mead
body: The page properties / reports macro is great - definitely worth checking out.


author: Tim Freehill
body: I will check it out, thanks!


author: Katerina Rudkovskaya [Stiltsoft]
body: Hello,

I think I have a solution for your use case if you use Confluence Server or Data Center. The [Table Excerpt Include](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Table+Excerpt+and+Table+Excerpt+Include+macros?src=contextnavpagetreemode) macro of the [Table Filter and Charts](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) app supports multi-export from pages by labels . The app also includes the [Table Transformer](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Table+Transformer+macro) macro that provides merging tables and any other kinds of table transformation:

1. Insert the Table Excerpt macro, set the 'Excerpt name' parameter, and place the tables within the macro body on every page.  

![2020-07-16_13h48_18.png](https://community.atlassian.com/t5/image/serverpage/image-id/103210iB503EFB17A56D02D/image-size/large?v=v2&px=999 "2020-07-16_13h48_18.png")![2020-07-16_13h48_27.png](https://community.atlassian.com/t5/image/serverpage/image-id/103211iBD1A23ADFED17BC8/image-size/large?v=v2&px=999 "2020-07-16_13h48_27.png")  
2. Add labels to the pages.  

![2019-03-28_18h15_43.png](https://community.atlassian.com/t5/image/serverpage/image-id/103213i0AF4DF9BC0080884/image-size/large?v=v2&px=999 "2019-03-28_18h15_43.png")  

3. Add the Table Excerpt Include macro on the page where you want to have a data table and select the option 'From pages by labels', specify 'Excerpt name' and 'Page labels' parameters.  

![2020-07-16_13h48_50.png](https://community.atlassian.com/t5/image/serverpage/image-id/103214i7787A5368468C210/image-size/large?v=v2&px=999 "2020-07-16_13h48_50.png")  

4. Wrap the Table Excerpt include macro in the Table Transformer macro, use '[Merge tables](https://docs.stiltsoft.com/display/TableFilter/Default+automatic+presets)' preset to merge all the tables in one.  

![2020-07-16_13h48_58.png](https://community.atlassian.com/t5/image/serverpage/image-id/103215i91985FFC7870CDF1/image-size/large?v=v2&px=999 "2020-07-16_13h48_58.png")![2020-07-16_13h49_06.png](https://community.atlassian.com/t5/image/serverpage/image-id/103216iB03AA829334D30AB/image-size/large?v=v2&px=999 "2020-07-16_13h49_06.png")  

Best regards,  
Katerina  
Stiltsoft


author: George Ivanov
body: Hi there,

for the server option of Confluence you can use "SQL-Powered Table Transformer" macro (<https://marketplace.atlassian.com/apps/1219300/sql-powered-table-transformer>) along with the standard Excerpt/Excerpt include macro

Put each of the tables inside the Excerpt macro container.

On the summary page add the SQL-Powered Table Transformer macro container, then inside the container link all the tables from other pages using the Excerpt Include macro.

Adjust the SQL Query in the SQL-Powered Table Transformer macro properties to pull the needed rows from the needed tables. Table names will be TABLE_1, TABLE_2, etc. (according to the order you put them into the SQL-Powered Table Transformer)

Cheers!


author: John Corwith
body: How about using the Office Excel macro using spreadsheet pages for your tables? The first sheet combines all the others (in your Excel file) and is on your parent page. Each child page gets a subsequent sheet in the spreadsheet file. When you use the spreadsheet macro, you can specify the sheet.


Tags: atlassian-marketplace

table