Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
Overview
This page demonstrates how to use the Table Plus macro, which is part of the Advanced Tables for Confluence app app, to provide view users an option to downloading or exporting (as an attachment) a CSV representation of the table view. By specifying the Allow exportexport parameter on the macro, users will be are given 2 icons that can be clicked to download or export the current table view to a CSV file. Download will place places the file on the user local system . Export will create and export creates an attachment.
Tip | ||
---|---|---|
| ||
See Release Notes 7.2. |
Section | ||||
---|---|---|---|---|
|
Macro
...
browser input
Select this
...
macro
Macro Name | Advanced Tables - Table Plus |
Macro Syntax | {table-plus} |
...
Parameters/
...
values
Table settings > Formatting > Table id | Product Revenue |
Table settings > Advanced settings > Enable download and export as attachment | On |
Column settings > Formatting > Column type (1 2 3) | S E I |
Column settings > Numbering & Totaling > Insert auto number column | On |
Column settings > Numbering & Totaling > Auto total numeric columns | On |
Column settings > Sorting > Automatically sort in descending order | On |
Column settings > Sorting > Automatically > Automatically sort by this column | 3 |
Screenshot
Wiki
...
markup input
Code Block | ||||
---|---|---|---|---|
| ||||
{table-plus:allowExport=true|id=Product Revenue|autoNumber=true|autoTotal=true|sortDescending=true|sortColumn=3|columnTypes=S,E,FF"$0,0"} || Product || On Plan || Revenue || | A | (/) | 325100 | | D | (/) | 315850 | | C | (x) | 250420 | | B | (/) | 98650 | | E | (x) | 79010 | {table-plus} |
Exported CSV
The attachment Product Revenue.csv exported above, can be imported back to a Confluence page using the the CSV Table Macromacro. This could be used for showing snapshots of tables that have been archived for a historical view. The following is like CSV Table macro with the attachment on this page.:
As
...
text
Code Block | ||
---|---|---|
| ||
"","Product","On Plan","Revenue" "1","A","https://examplegear.com/s/en_GB/6214/6860359b26f1e8cc7164bebdad0e2f04c128c291.1/_/images/icons/emoticons/check.png","$325,100" "2","D","https://examplegear.com/s/en_GB/6214/6860359b26f1e8cc7164bebdad0e2f04c128c291.1/_/images/icons/emoticons/check.png","$315,850" "3","C","https://examplegear.com/s/en_GB/6214/6860359b26f1e8cc7164bebdad0e2f04c128c291.1/_/images/icons/emoticons/error.png","$250,420" "4","B","https://examplegear.com/s/en_GB/6214/6860359b26f1e8cc7164bebdad0e2f04c128c291.1/_/images/icons/emoticons/check.png","$98,650" "5","E","https://examplegear.com/s/en_GB/6214/6860359b26f1e8cc7164bebdad0e2f04c128c291.1/_/images/icons/emoticons/error.png","$79,010" "","","","$1,069,030" |
With CSV Table
...
macro as-is
Csv | ||
---|---|---|
| ||
With CSV Table
...
macro with a few parameters to make it look more like the original
Csv | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
The following parameters were used in the CSV Table macro is shown above:
Select this
...
macro
Macro Namename | Advanced Tables - CSV Table |
Macro Syntaxsyntax | {csv} |
Define these
...
parameters/values as follows:
CSV Table settings > Data settings > Output format | wiki |
---|---|
Row settings > Header & footer rows > Number of header rows | 1 |
CSV Table settings > Data format > Augments to data row values | , , !%3%! |
CSV Table settings > Data format > Augments > Augments to footing footer row values | , , Total |
CSV Table settings > Data source > Method of locating JSON data (Attachment) > Attachment | Product Revenue.csv |
Column settings > Formatting > Column type (1 2 3 4) | I S E C |
Other
...
examples
Visit our full list of product examples for additional inspiration!