Download PDF
Download page Table Excerpt and Table Excerpt Include.
Table Excerpt and Table Excerpt Include
The Table Excerpt and Table Excerpt Include macros combine different kinds of table excerption and multi-excerption in one tool:
- excerption within one page
- multi-excerption within multiple pages and spaces searched by:
- page names
- page trees
- labels
The macros improve the performance of pages storing large tables and let you use the original tables for any purpose, including filtering, building multiple charts and pivot tables.
Why should I use these macros?
When you build multiple pivot tables and charts from table ➜
Multiple copies of a large source table within one page cause reducing of processing speed ➜
Inserting references to a source table with the Table Excerpt/Table Excerpt Include macros leads to continued productivity.
Using the Table Excerpt Macro
Adding the Table Excerpt macro to a page:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
- Enter the unique identifier for the macro.
- Click Insert.
You will be able to reference the marked table by inserting the Table Excerpt Include macro and entering the specified unique name.
Speeding up macro entry with autocomplete: type { and the beginning of the macro name 'Table Excerpt", to see a list of suggested macros. Select the Table Excerpt macro from the prompted results.
Adding a Table into the Table Excerpt Macro:
- Copy (cut) a table.
- Paste the table into the Table Excerpt macro placeholder.
Using the Table Excerpt Include Macro
Adding the Table Excerpt Include Macro to a Page and Specifying the Settings:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
- Specify the settings:
- Enter the Excerpt name of the macro.
- Select the Excerpt source to define the pages containing the Table Excerpt macro:
- Current page
- Specific page (specify the page title)
- Page and childpages (specify the page title)
- Page and all descendants (specify the page title)
- Pages with labels (specify the page labels and the space title) - If you select the Current page option, select the Show a copy of the source table checkbox in case you want to show a copy of a source table in the page view mode.
- If you select other options, choose to Show page meta data in case you want to include such meta information as:
- page
- parent page
- space
- labels
- excerpt
- author
- last modifier
- created
- updated. - To improve performance of the page, select the Output cached results checkbox. Please note that in this case the included content is static. To update the content in the Table Excerpt Include macro, you need to visit the source page. If the checkbox is unchecked, the included content is dynamic, i.e. the latest edition of the source content will be displayed in Table Excerpt Include.
- Click Insert.
Speeding up macro entry with autocomplete: type { and the beginning of the macro name 'Table Excerpt Include', to see a list of suggested macros. Select the Table Excerpt Include macro from the prompted results.
You can use the Table Excerpt Include macro within one page without showing the source table in combination with the Pivot Table and Chart from Table macros because a pivot table and a chart can be built without displaying a source table.
On the other hand, if you want to use the Table Excerpt Include macro within one page in combination with the Table Filter macro you need to select the "Show a copy of the source table" checkbox because this macro requires a table for its correct work.
Note that after changing page permissions for a user, viewing the restricted data in the Table Excerpt Include macro is still possible using the Output cached results option until this user or another with the same restrictions revisit the page.
The reason for this is that the user has already viewed or exported restricted data on the page earlier.
Using the Same Table for Generating Multiple Charts
- Insert the Table Excerpt macro and place the source table into the macro body according to the instructions above.
- Insert the Table Excerpt Include macro according to the instructions above and place it into the Table Filter, Pivot Table or Chart from Table macros or their combination.
- Adjust the parameters filtering, pivot tables and charts.
- Save the page.
As the result, you will receive multiple charts generated on the basis of the same data table from multiple pages.
View mode:
Edit mode:
Merging Tables
If you need to merge tables that have the same column names from different pages, please do the following steps:
1. Wrap tables on different pages with the Table Excerpt macro and name them identically.
2. Insert the Table Excerpt Include macro on a new page.
3. Specify the settings:
- the Excerpt name of the macro
- the Excerpt source to define the pages containing the Table Excerpt macro.
4. Choose Show as a report table option.
5. Save the page to see the result.
Note, that if your tables have different column names, you need to use the Table Transformer macro and choose Custom Transformation for merging.
Transposing Tables
You can transpose your source table(s) using the corresponding option in the Table Excerpt Include macro browser:
- Auto - tables are transposed only in case they can be merged into one table with a header row. This option works only if Show as a report table is enabled.
- Always - tables are transposed in any case.
- Never - tables are not transposed.
Showing Page Metadata
To depict page metadata, please do the following:
- Open the settings of the Table Excerpt Include macro.
- Specify the settings for the Show page meta data field.
- Save the page to see the result.
Deriving Table Excerpts from different spaces
To extract Table Excerpt(-s) from other space:
- Add Table Excerpt Include to a page.
- Open the settings of the Table Excerpt Include macro.
- Specify the Excerpt source.
Fill in the Page title field by either starting to enter the page name to select it from the appearing dropdown OR manually via the following pattern:
Space key:Page title -> e.g. NK:MY PAGE
CODE- Save the macro and the page.
Ordinarily, indicating&selecting the page name from a different space in the Page Title field automatically determines its location, thus manual entering of the Space Key is rarely used - to derive Table Excerpt(-s) from the same-titled pages but of a different space.
In case you wonder how to locate your space key for further indication in the macro, it can be found the following ways:
- Via Confluence Space Tools→Overview→Space Key
- In the URL of the source page containing Table Excerpt after publishing it (e.g. https://Your_Confluence_Site_Name/display/SPACE KEY/Page title)
Combining of Table Excerpt/Table Excerpt Include with Table Filter
1. You need to use the following structure: Table Filter > Table Excerpt > Table if you want to reuse the source table without filters on the same or another page with the help of Table Excerpt Include.
Wrap Table Excerpt Include with Table Filte r and filtration will affect its data on the page.
2. This structure: Table Excerpt > Table Filter > Table will let you use the already filtered table on the same or another page with the help of Table Excerpt Include.
Table Filter > Table Excerpt > Table
Table Excerpt > Table Filter > Table
Combining of Table Excerpt Include with Page Properties Report
If you want to combine data of Table Excerpt and Page Properties, you need to add a column with the page title to the table inside Table Excerpt first.
Then you need to wrap Table Excerpt Include and Page Properties Report with the Table Transformer macro and merge their data by the Title column.