Office Excel Macro

Still need help?

The Atlassian Community is here for you.

Ask the community

The Office Excel macro is going away in a future release

Read more about this change or find out about a better way to insert and preview Excel files.

 

 

The Office Excel macro displays the content of an Excel spreadsheet on a wiki page. First attach the spreadsheet to a Confluence page, then use the macro to display the content. When viewing the page, people will see the content of the spreadsheet, without needing to have Office installed.

For details, see the View File Macro.

 

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: viewxls

Macro body: None.

Parameter nameRequiredDefaultParameter description and accepted values
nameYes(None.)

The file name of the Excel spreadsheet to be displayed. The document must be attached to a page on your Confluence site.

pageNoThe page containing the macroThe name of a Confluence page to which the Excel spreadsheet is attached.
colNoLast 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 col and 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.

rowNoLast row with contentThe number of the last row you want displayed, starting from '0' as the first row.
gridNotrue

Determines whether the macro will show borders around the cells in the spreadsheet.

Accepted values:

  • true – Shows borders.
  • false – Does not show borders.
sheetNoThe most-recently viewed worksheetThe name of the worksheet that you want displayed.

Storage format example

<ac:structured-macro ac:name="viewxls">
  <ac:parameter ac:name="col">E</ac:parameter>
  <ac:parameter ac:name="name">
    <ri:attachment ri:filename="Spreadsheet.xls"/>
  </ac:parameter>
  <ac:parameter ac:name="sheet">Sheet1</ac:parameter>
  <ac:parameter ac:name="row">5</ac:parameter>
</ac:structured-macro>

Wiki markup example

{viewxls:col=5|page=Docs|name=My document.xls|grid=false|sheet=mysheet|row=5}

 

 

Last modified on Dec 2, 2015

Was this helpful?

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