People compose content using a variety of tools.  Rather than copying and pasting that content into Confluence, you can attach the file to your page and use the macro to show it to your page viewers without anyone having to have Office installed.  This lets you maintain the formatting, animations, and formulas from those programs and share them easily in Confluence.

Office Word

The Office Word macro embeds your document in the page, rather than showing a simple preview. 

This is great for situations where you can't simply copy the content into the Confluence page, because you want to preserve formatting or other Word functionality. 

  1. Attach the file to a page from the More actions menu when viewing the page, or use the Files & images tool in the toolbar to upload the file.
  2. Insert the macro to display the content. 
  3. Delete the file from the page if you don't want it to show up as an attachment when others view the page.

Parameters

Parameter nameRequiredDefaultParameter description and accepted values
nameYes(None)

The file name of the Word document to be displayed. The document must be attached to a page on your Confluence site.

pageNoThe page containing the macroThe name of a Confluence page to which the Word document is attached.

Wiki markup example

Wiki markup is only supported in the legacy editor.


robotsnoindex
robotsnoindex

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: viewdoc

Macro body: None.

{viewdoc:page=Docs|name=My document.doc}

Office Excel

A note on the Excel macro

We've received feedback that the Excel macro doesn't meet expectations in some cases. There are some known issues with it right now, which are detailed below. So why are we proceeding with the rollout? We're making infrastructure changes for the overall benefit of Confluence users, but they mean that we can't keep the old Office and PDF macros working much longer. We need to proceed with the rollout so we can move forward with the infrastructure changes that have a much wider impact than this macro.

In saying that, we, of course, genuinely care about every user's experience with Confluence, and always want it to be the best. If you're having real trouble with the new file viewer in the Excel macro, comment on this issue and let us know. There unfortunately isn't a short-term fix, as we do need to move off the old Excel macro, but we'll keep working on a better solution for the Excel macro.


The Office Excel macro embeds your spreadsheet in the page, rather than showing a simple preview. 

This is great for situations where you need more than a basic Confluence table can provide, such as for financial information or planning data. 

  1. Attach the file to a page from the More actions menu when viewing the page, or use the Files & images tool in the toolbar to upload the file.
  2. Insert the macro to display the content. 
  3. Delete the file from the page if you don't want it to show up as an attachment when others view the page.

Parameters

Parameter nameRequiredDefaultParameter description and accepted values
nameYes(None.)

The file name of the Excel spreadsheet to be displayed. The document must be attached to a page on your Confluence site.

pageNoThe page containing the macroThe name of a Confluence page to which the Excel spreadsheet is attached.

Wiki markup example

Wiki markup is only supported in the legacy editor.


robotsnoindex
robotsnoindex

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: viewxls

Macro body: None.

{viewxls:page=Docs|name=My document.xls}

Office PowerPoint

The Office PowerPoint macro displays your presentation in a viewer with next and back buttons, rather than showing a simple preview. 

This is great for sharing presentations, training sessions, and other visual data. 

  1. Attach the file to a page from the More actions menu when viewing the page, or use the Files & images tool in the toolbar to upload the file.
  2. Insert the macro to display the content. 
  3. Delete the file from the page if you don't want it to show up as an attachment when others view the page.

Parameters

Parameter nameRequiredDefaultParameter description and accepted values
nameYes(None.)

The file name of the PowerPoint presentation to be displayed. The document must be attached to a page on your Confluence site.

pageNoThe page containing the macroThe name of a Confluence page to which the PowerPoint presentation is attached.
heightNo
The height of the macro display, specified in pixels (for example: 10px, or just 10) or as a percentage (for example: 20%) of the window's height.
widthNo
The width of the macro display, specified in pixels (for example: 10px, or just 10) or as a percentage (for example: 20%) of the window's height.

Wiki markup example

Wiki markup is only supported in the legacy editor.


robotsnoindex
robotsnoindex

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: viewppt

Macro body: None.

{viewppt:height=20%|page=Docs|width=20%|name=My document.ppt}



tip/resting Created with Sketch.

Edit files with your desktop apps

Use the apps on your computer to edit files stored in Confluence. Click on the file, then hit Edit with at the top and download the Atlassian Companion app. After that, you can edit and automatically re-upload edited files to Confluence. Check out Edit files for all the details.