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.

There's a known issue with the Office Excel macro (View File macro) where changes to the Row or Column fields aren't applied unless the Worksheet field is also modified. As a result, the macro might not display the correct range from your Excel file.

As a workaround, after changing the Row or Column values, also update the Worksheet field to apply your changes. Alternatively, you can delete and re-upload your Excel file. Refer to CONFSERVER-73610 for more details


For specific information about each macro, see:

On this page:

Add this macro to your page

To add a View File macro to a page:

  1. From the editor toolbar, select Insert , then Other Macros.
  2. Choose Office Excel, Office PowerPoint, Office Word, or PDF from the Confluence content category.
  3. Select the file you want to display and enter any additional parameters.
  4. Choose Insert

You can then publish your page to see the macro in action. 

Supported file types

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

  • Office Excel (.xls and .xlsx)
  • Office PowerPoint (.ppt and .pptx)
  • Office Word (.doc and .docx)
  • PDF  (.pdf)

Editing files

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 Jan 20, 2026

Was this helpful?

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