Office Excel Macro

Add the Office Excel macro to a page to display the contents of an Excel spreadsheet.

This is great for situations where you need more than a basic Confluence table can provide, such as for financial information or planning data. 

This macro embeds your spreadsheet in the page, rather than showing a simple preview. People viewing the page don't need Excel installed to be able to see the spreadsheet. 

On this page:

Screenshot: a page with an Office Excel macro displaying an Excel spreadsheet.


There are other ways to add a spreadsheet to your page:

  • Insert the file directly into the page. We'll display a PDF thumbnail of the sheet. This is okay for simple spreadsheets but may not be suitable for complex or multi-sheet files.
  • Use the Widget Connector Macro to embed a Google Sheet.

Add this macro to your page

To add the Office Excel macro to a page:

  1. Upload the Excel file to your page, then publish the page. See Upload Files to learn how to do this. 
  2. Unable to render {include} The included page could not be found.
  3. Choose Office Excel from the Confluence content category.
  4. Select the attached file you want to display. 
  5. Choose Insert

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

Screenshot: configuring the Office Excel macro in the macro browser. 

Edit the attached file

If you have Excel installed, you can edit the attached file, and automatically re-upload the file back to Confluence. 

See Edit Files for more information on the ways to do this. 

Change the macro parameters

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Here's a list of the parameters available in this macro. 

Parameter

Default

Description

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.

If the file does not appear, publish the page, then head back into the editor and try again.

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.

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Limitations

Unable to render {include} The included page could not be found.

Other ways to add this macro

Add this macro as you type

Unable to render {include} The included page could not be found.

Add this macro using wiki markup

Unable to render {include} The included page could not be found.

Macro name: viewxls

Macro body: None.

{viewxls:col=5|page=Docs|name=My document.xls|grid=false|sheet=mysheet|row=5}
Last modified on May 4, 2020

Was this helpful?

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