View File Macro

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.

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. From the editor toolbar, choose Insert > Other Macros
  2. Find and select the required macro

Speed it up with autocomplete: Type and the beginning of the macro name, to see a list of suggested macros. In this example we're inserting the cheese macro.

To edit an existing macro: Click the macro placeholder and choose Edit. This will open the macro details, so you can edit the macro parameters.

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 a document

You can edit files embedded with the View File macro using your preferred desktop application, then save the file back to Confluence automatically. Head to Edit files for instructions.

  • Word and Excel – choose the Edit button above the content.
  • PowerPoint and PDF – choose the edit icon on the viewer.

Importing content from Word documents

If you want to use the contents of your Word document to create a Confluence page, see Import a Word Document into Confluence.

Last modified on Dec 12, 2019

Was this helpful?

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