• Products
  • Documentation
  • Resources

Insert Microsoft Office macros

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 name

Required

Default

Parameter description and accepted values

name

Yes

(None)

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

page

No

The page containing the macro

The name of a Confluence page to which the Word document is attached.

Wiki markup example

Wiki markup is only supported in the legacy editor.

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.

1 2 3 4 {viewdoc:page=Docs|name=My document.doc}

Office Excel

The Office Excel Macro experience was updated in June 2022. Before the update, the macro would display a PDF version of an Excel file. The updated experience displays an HTML rendering of the Excel file and includes a spreadsheet selector at the bottom of the view.

If the macro is being used to display an Excel file uploaded prior to the update, the file will need to be re-uploaded to be used with the updated experience.

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. 

To insert an Office Excel macro:

  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. From the editor toolbar, choose Insert.

  3. Choose Office Excel from the dropdown.

  4. Select the file you want to display and choose Save.

Parameters

Parameter name

Required

Default

Parameter description and accepted values

name

Yes

(None.)

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

page

No

The page containing the macro

The name of a Confluence page to which the Excel spreadsheet is attached.

Wiki markup example

Wiki markup is only supported in the legacy editor.

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.

1 {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 name

Required

Default

Parameter description and accepted values

name

Yes

(None.)

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

page

No

The page containing the macro

The name of a Confluence page to which the PowerPoint presentation is attached.

height

No

 

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.

width

No

 

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.

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.

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

 

Additional Help