Office Excel Macro
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 name | Required | Default | Parameter description and accepted values |
---|---|---|---|
name | Yes | (None.) | The file name of the Excel spreadsheet to be displayed. The document must be attached to a page on your Confluence site. |
page | No | The page containing the macro | The name of a Confluence page to which the Excel spreadsheet is attached. |
col | No | 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 |
row | No | Last row with content | The number of the last row you want displayed, starting from '0' as the first row. |
grid | No | true | Determines whether the macro will show borders around the cells in the spreadsheet. Accepted values:
|
sheet | No | The most-recently viewed worksheet | The 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}