It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use an attachment on one page in another page without copymate?

Jagbir Singh Jan 30, 2012

I have 2 seperate pages where I need to use a single excel attachment and I need this attachment to display an excel macro. If I attach the excel file on one page I can create an excel macro on that particular page. In order to display the same file on the other page I have to again attach the same file on the other page. Is there a way to use the attachment on one page on another page and use it to display excel macro.



4 answers

1 accepted

0 votes
Answer accepted
David Simpson Community Leader Jan 30, 2012

If the attachment is viewable on both pages, perhaps you could wrap the Excel Macro in an Except Macro on one page, then use the Except Include Macro on the other.

0 votes
JamieA Jan 30, 2012

Can't you refer to the attachment using the page name, ie SomePage^file.xls, then have it on both pages using the {include} macro?

0 votes
David Peterson Jan 31, 2012

If Jamie's suggestion works, it would obviously be the simplest. Otherwise, if you have the Reporting Plugin, you can use {report-on} to allow the attachment to execute in the context of the other page. Something like this:

{report-on:value:content "Other Page Name"}{view-excel:my.xls}{report-on}

You could turn it into a User Macro to make life simpler if you do this a lot.

0 votes

Just in addition to Jamie and David. If you face this problem quite a lot I'd suggest creating an Inclusions Library as described here:

Using Confluence, you can dynamically include content from one page into another page. You can include a whole page into another one, using the Include macro. You can also define an ‘excerpt’ on a page, and then include that excerpted text into another page using the Excerpt Include macro.

To organise your re-usable content, we recommend that you create a set of pages called an 'inclusions library'.

  1. Open the 'Browse' menu and select 'Pages'.
  2. The 'List Pages' screen will appear. Open the 'Add' menu and select 'Page'.
    This will add a page at the root of the space, at the same level as the home page.
  3. Enter a suitable title. We use '_InclusionsLibrary'. The unusual format of the title helps to let people know this page is special.
  4. Enter some content on the page. We enter text explaining the purpose of the inclusions library and how to re-use the content. You can copy our text by clicking through to one of the example pages listed below.
  5. Add child pages containing your re-usable content. See the examples of our own inclusions libraries listed below.

Some notes about inclusions libraries:

  • The inclusions library is not a specific feature of Confluence. The pages in the inclusions library are just like any other Confluence page.
  • The pages are located at the root of the wiki space, not under the home page. This means that they will not appear in the table of contents on the left and they will not be picked up by the search in the left-hand navigation bar either.
  • The pages will be picked up by other searches, because they are just normal wiki pages.
  • We have decided to start the page name with an underscore. For example, '_My Page Name'. This indicates that the page is slightly unusual, and will help prevent people from changing the page name or updating the content without realising that the content is re-used in various pages.

Examples of Inclusions Libraries

Here are some examples in our documentation:

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,228 views 7 18
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