Macros for Viewing Office Docs do not work Correctly on Comments

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Using the viewfile macros (viewdoc, viewxls, viewppt) on a comment will give an error message when saved:

viewxls: The viewfile macro is unable to locate the attachment "example.xls" on this page

Cause

The markup created by the Macro Browser is only valid when used in pages or blogs, not in comments. See CONF-16935 for further information.

Resolution

In Confluence 3.5 or earlier

Change the markup:

{viewdoc:name=example.xls}

to include the page name:

{viewdoc:page=<PAGE-TITLE>|name=example.xls}

In Confluence 4.0 or later

  1. In the comment editor, click 'Insert More Content'
  2. In the drop down click 'Insert Wiki Markup'
  3. Enter the wiki markup syntax for the viewfile macro:

    {viewdoc:page=<PAGE-TITLE>|name=example.xls}

The workaround does not work for PDF's.

Last modified on Oct 7, 2015

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.