The view file macro allows you to embed an Office or PDF document into your Confluence page. First attach the document to a wiki page and then use the view file macro to display the document's content.
When viewing the page, users will see the content of the Office document. Users do not need to have Office installed, in order to see the content of the Office document.
Where applicable, users will be able to open the document for editing in their Office application.
This is just one of the ways Confluence can interact with Office documents. For an overview of all Office Connector features, please refer to Working with the Office Connector.
The view file macro provides several unique parameter options for some of the types of files it handles. Hence, to simplify its use, the view file macro is separated into the following four macros in the macro browser:
On this page:
To use the view file macro without the macro browser, enter it directly in the Wiki Markup or Rich Text editors based on one of the following examples, along with any parameters (described below) that suit the type of file.
{viewdoc:name=my document.doc}
{viewppt:name=my presentation.ppt}
{viewxls:name=my spreadsheet.xls}
{viewpdf:name=my document.pdf}
|
|
The live example below shows how to display an Excel spreadsheet on a Confluence page. The Excel spreadsheet is attached to this documentation page.
What you need to type |
What you will get |
|---|---|
{viewxls:name=my spreadsheet.xls} |
|
Above are the prerequisites for viewing or displaying Office documents in Confluence. For a full list of Office Connector prerequisites and limitations, please refer to:
To insert the Office Word macro into a page using the Macro Browser,
|
Once you have found the Office Word macro and have added the required parameter values, click 'insert' to add it to your page. |
{viewdoc:name=my document.doc} |
Parameter |
Required? |
Default |
Description |
|
|---|---|---|---|---|
File Name |
yes |
none |
The file name of the Office Word document to be displayed. The document must be attached to a wiki page on your Confluence site. |
|
Page Name |
no |
The page which contains the {viewdoc} macro |
Enter a page name, if you wish to display a document which is attached to another Confluence page. For example:
|
|
Space Key |
no |
The space of the page which contains the {viewdoc} macro |
Enter a space key, if you wish to display a document which is attached to a page in another Confluence space. For example:
|
|
Date |
no |
none |
If the Page Name refers to a blog post instead of a conventional page, enter the date of the post in the form |
When viewing a wiki page that displays an attached Office document, you can launch your Office editor directly from Confluence.
Screenshot: The title bar showing 'document.doc' above an embedded Office document
You will find detailed instructions in Editing an Office Document from Confluence.
You can display an PowerPoint presentation on a Confluence page. By default, the presentation will be displayed as a dynamic slide show, using Adobe Flash Player. You can also choose to display just one of the slides as a static JPEG image.
To insert the Office Powerpoint macro into a page using the Macro Browser,
|
Once you have found the Office Powerpoint macro and have added the required parameter values, click 'insert' to add it to your page. |
{viewppt:name=my presentation.ppt} |
Parameter |
Required? |
Default |
Description |
|||
|---|---|---|---|---|---|---|
File Name |
yes |
none |
This file name of the Office Excel document to be displayed. The document must be attached to a wiki page on your Confluence site. |
|||
Height |
no |
|
Specify the height of the display, in pixels (default) or as a percentage of the window's height. For example, to specify a height of 200 pixels:
This code also specifies a height of 200 pixels:
This code specifies a height of 10 percent of the window's height:
|
|||
Page Name |
no |
The page which contains the {viewppt} macro |
Enter a page name, if you wish to display a document which is attached to another Confluence page. For example:
|
|||
Slide Number |
no |
none |
Specify the number of the slide which you want displayed on the Confluence page, starting with '0' for the first slide. Instead of a slide show, the page will display just the single slide represented as a JPEG image. |
|||
Space Key |
no |
The space of the page which contains the {viewppt} macro |
Enter a space key, if you wish to display a document which is attached to a page in another Confluence space. For example:
|
|||
Width |
no |
|
Specify the width of the display, in pixels (default) or as a percentage of the window's width. For example, to specify a width and height of 200 pixels:
This code also specifies a width and height of 200 pixels:
This code specifies a width of 10 percent of the window's width:
|
|||
Date |
no |
none |
If the Page Name refers to a blog post instead of a conventional page, enter the date of the post in the form |
When you view the PowerPoint presentation on a Confluence page, options on the bottom frame of the slide show allow you to:
Screenshot: PowerPoint presentation embedded on a Confluence page
To insert the Office Excel macro into a page using the Macro Browser,
|
Once you have found the Office Excel macro and have added the required parameter values, click 'insert' to add it to your page. |
{viewxls:name=my spreadsheet.xls} |
Parameter |
Required? |
Default |
Description |
|
|---|---|---|---|---|
File Name |
yes |
none |
This is the file name of the document to be displayed. The document must be attached to a wiki page on your Confluence site. |
|
Last Column |
no |
Last column with content |
Enter the number of the last column you want displayed, starting from '0' as the first column. For example, the following code will show the first 3 rows and the first 3 columns:
|
|
Show Grid? |
no |
true |
Select the check box in the macro browser ( |
|
Page Name |
no |
The page which contains the {viewxls} macro |
Enter a page name, if you wish to display a document which is attached to another Confluence page. For example:
|
|
Last Row |
no |
Last row with content |
Enter the number of the last row you want displayed, starting from '0' as the first row. For example, the following code will show the first 3 rows and the first 3 columns:
|
|
Worksheet Name |
no |
First worksheet in the spreadsheet |
Enter the name of the worksheet that you want displayed. |
|
Space Key |
no |
The space of the page which contains the {viewxls} macro |
Enter a space key, if you wish to display a document which is attached to a page in another Confluence space. For example:
|
|
Date |
no |
none |
If the Page Name refers to a blog post instead of a conventional page, enter the date of the post in the form |
When viewing a wiki page that displays an attached Office spreadsheet, you can launch your Office editor directly from Confluence.
Screenshot: The title bar showing 'spreadsheet.xls' above an embedded Excel spreadsheet
You will find detailed instructions in Editing an Office Spreadsheet from Confluence.
To insert the View PDF macro into a page using the Macro Browser,
|
Once you have found the View PDF macro and have added the required parameter values, click 'insert' to add it to your page. |
{viewpdf:name=my document.pdf} |
Parameter |
Required? |
Default |
Description |
|
|---|---|---|---|---|
File Name |
yes |
none |
This is the file name of the document to be displayed. The document must be attached to a wiki page on your Confluence site. |
|
Page Name |
no |
The page which contains the {viewpdf} macro |
Enter a page name, if you wish to display a document which is attached to another Confluence page. For example:
|
|
Space Key |
no |
The space of the page which contains the {viewpdf} macro |
Enter a space key, if you wish to display a document which is attached to a page in another Confluence space. For example:
|
|
Date |
no |
none |
If the Page Name refers to a blog post instead of a conventional page, enter the date of the post in the form |
When you view the PDF document on a Confluence page, it is displayed as a slide show. Options on the bottom frame of the slide show allow you to:
Screenshot: PDF document embedded on a Confluence page
Problems? Please refer to our guide to the Office Connector limitations and known issues.
Take me back to the Confluence User Guide.