Child pages
  • Embed Office Documents and PDF's in page
Skip to end of metadata
Go to start of metadata

You can display and view an Office document (and PDF's) that is attached to a Confluence page. If you have an Office application installed, you will also be able to edit the Office document in your Office application. It's really easy to do using the View File macro. For example, the following wiki markup will display a PDF file that is attached to a Confluence page:

Full details can be seen below:

Use of the Include Page Macro

Icon
  • The answer displayed below is using the Include Page Macro which allows you to include a Confluence page from the same instance in another Confluence page
  • The original page is called View File Macro
The View File macros allow you to embed an Office or PDF document into your Confluence 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 an Office document. If they do have Office installed, people will be able to open the document for editing in their Office application.

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

For an overview of all Office Connector features, please refer to Working with the Office Connector.

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 Using Autocomplete.

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).

Macro

Parameter

Default

Description

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

none

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?

true

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.

Office

PowerPoint

 

 

Height

 

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

Slide Number

none

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.

Width

 

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 Editing an Office Document from Confluence.

Troubleshooting

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

Code examples

Refer to the page for each macro to see storage format and wikimarkup examples.