View File Macro

The View File macros are going away in a future release

Read more about this change or find out about a better way to insert Office and PDF files.


The View File macros allow you to embed an Office or PDF document on a page. First attach the document to a page and then use one of the View File macros to display the document's content.

When people view the page, they will see the content of the Office or PDF document. They do not need to have Office installed in order to see the content of the file. 

For a full list of Office Connector prerequisites and limitations, please refer to:

Displaying an Office or PDF Document in Confluence

To display an Office or PDF document in a page, use one of the following View File macros in the macro browser:

  • Office Excel
  • Office PowerPoint
  • Office Word
  • PDF

To add one of the View File macros to a page:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Parameters for the Office and PDF macros

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).





All View File macros

Page Name

The page which contains the macro

Enter a page name, if you wish to display a document which is attached to another Confluence page.

File Name


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

Office Excel

Show Grid?


Select to show grid lines around each cell of the Excel spreadsheet. Clear to hide these grid lines.

Worksheet Name

Last worksheet viewed in the spreadsheet

The name of the worksheet that you want displayed.

Last Row

Last row with content

The number of the last row you want displayed, starting from '0' as the first row.

Last Column

Last column with content

The number of the last column you want displayed, starting from '0' as the first column.

Hint for reducing the size of the spreadsheet: Use the Last Column and Last Row parameters to reduce the size of the spreadsheet displayed on the wiki page. This is especially useful to prevent the display from showing empty cells. This will also help to prevent 'out of memory' errors.




Specify the height of the display, in pixels (default) or as a percentage of the window's height.

Slide Number


Specify the number of the slide that you want displayed on the Confluence page, where the first slide is numbered zero. Instead of a slide show, the page will display just the single slide, represented as a JPEG image. If not specified, all slides display as a slideshow.


Specify the width of the display, in pixels (default) or as a percentage of the window's width.

Editing an Office document

You can launch your Office application and edit Office documents displaying in the view file macros directly from your Confluence page. 

  • Word and Excel - choose the Edit Document link above the content
  • PowerPoint - choose the edit icon on the viewer. 

You will find more information and other methods for editing attached Office documents in Edit Office Files.


Problems? Please refer to our guide to the Office Connector limitations and known issues.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport