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

Jagbir Singh January 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.

Thanks

Sunny

4 answers

1 accepted

0 votes
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 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
Christian Czaia _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2012

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:

0 votes
David Peterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events