• Products
  • Documentation
  • Resources

Insert Microsoft Office macros

You can attach a Microsoft Office file to your page and use a macro to show in your page without the viewing needing 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. Type / (or select Insert from the toolbar) where you want to insert your file and select the Office Word macro.

  3. Choose your file and select Save.

  4. If you don’t want the thumbnail of the file to show up as an attachment, delete the file you added in Step 1.

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}

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.

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. 

Larger Excel files are not currently supported, so you might need to reduce the size of your file to display a preview. The maximum functional file size will vary depending on factors such as content and formatting.

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. Type / (or select Insert from the toolbar) where you want to insert your file and select the Office Excel macro.

  3. Choose your file and select Save.

  4. If you don’t want the thumbnail of the file to show up as an attachment, delete the file you added in Step 1.

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

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}

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.

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. Type / (or select Insert from the toolbar) where you want to insert your file and select the Office Powerpoint macro.

  3. Choose your file and select Save.

  4. If you don’t want the thumbnail of the file to show up as an attachment, delete the file you added in Step 1.

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}

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.

Additional Help