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

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.

Thanks

Sunny

4 answers

1 accepted

This widget could not be displayed.
David Simpson Community Champion 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.

This widget could not be displayed.

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?

This widget could not be displayed.

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.

This widget could not be displayed.

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:

http://confluence.atlassian.com/display/DOC/Creating+your+Technical+Documentation+Space
http://confluence.atlassian.com/display/DOC/_InclusionsLibrary

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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

464 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you