How to get data from a table stored on a wiki page?
Asked by Randall Johnson:

I want to create a table on a WIKI page containing data and then pull data out of this table to use on other WIKI pages within the same space. I have created my table page using the table-data macro but cannot figure out how to pull data from it.

Anyone know how to do this or have a reference they can point me to?

Thanks!


Answers:
author: Katerina Rudkovskaya [Stiltsoft]
body: Hello Randall,  

There are [Table Excerpt and Table Excerpt Include](https://docs.stiltsoft.com/display/TFAC/How+to+use+Table+Excerpt+and+Table+Excerpt+Include+macros)macros in the [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview) app which could help you in this case.  

Here's an example on how to use them:  

1. Wrap your source table with Table Excerpt.  

![Screenshot_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/95823i949E8BC1CFADA0E4/image-size/large?v=v2&px=999 "Screenshot_1.png")

2. Insert the Table Excerpt Include macro on another page and configure it.  

![Screenshot_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/95824i057E986A27254E5E/image-size/large?v=v2&px=999 "Screenshot_2.png")![Screenshot_3.png](https://community.atlassian.com/t5/image/serverpage/image-id/95825i35BE3CACA29CF6EB/image-size/large?v=v2&px=999 "Screenshot_3.png")![Screenshot_4.png](https://community.atlassian.com/t5/image/serverpage/image-id/95827i382F486ECC3A93C1/image-size/large?v=v2&px=999 "Screenshot_4.png")

Result: the same table are ready for filtering, building charts, pivot tables and transformation on another WIKI page.  

![Screenshot_5.png](https://community.atlassian.com/t5/image/serverpage/image-id/95828iD84E30C1DB427999/image-size/large?v=v2&px=999 "Screenshot_5.png")

Please use our [documentation](https://docs.stiltsoft.com/pages/releaseview.action?pageId=42239760) to get more info about our app.  

Katerina  
StiltSoft


author: Matthew J. Horn
body: I think you're trying to do something that Confluence/static HTML is not meant to do.

That being said, are you sure you can't use jQuery? It's built in by default. If you have the HTML macro enabled, you can use it.


author: Matthew J. Horn
body: If you only want to pull out selective information from the table (for example, one row, or one cell in a row), then you could use jQuery.


author: Randall Johnson
body: When I try to use jQuery by putting {jQuery} on page, I get an unknown macro message. Not listed in macros I can insert either when using rich text edit mode with toolbar.


author: Randall Johnson
body: I don't want to replicate the table on other wiki pages, I want to selectively pull data out of table cells to display on other wiki pages.

For example, each row contains dates for a project. There will be unique project wiki pages that I want to be able to reference dates stored in a master table containing dates for all projects. This way only the master table needs to get updated and the individual project wiki pages will update based on values in the table.

jQuery is not a macro we have installed with out confluence WIKI so unfortunately that is not an option.

I tried using the get-data macro but I am not sure how to reference the cells in the table with it nor do I know if it will work across pages.

In a simple experiment I did the following all on same WIKI page:

{set-data:test_field\|type=text}pickle

{get-data:test_field}{get-data}

In this example get-data retrieves "pickle". But I was not able to use get-data on another WIKI page to retrieve the test_field value.

I cannot find much info that details out how field data is handled, what is local to a page versus global to a space, how to address fields, etc.

If anyone knows how to pull data from one page to another, I would really appreciate it.

Thanks!


author: Jobin Kuruvilla [Adaptavist]
body: If that table is the only one in the page, you can use the include page macro.

<https://confluence.atlassian.com/display/DOC/Include+Page+Macro>