Excel macro - 6.x



On this page

Features

  • Convert your Excel spreadsheets into tables

  • Access data from Excel files from attachments on any Confluence page, URLs or Confluence directories

  • Download Excel table data as a CSV file

  • Compatible with the Chart macro to create charts

  • Enabled for Macro Security for Confluence to allow control of URLs. See Macro Security managed macros.

  • Display and format one or more worksheets in your Excel files

  • Format any of the columns, including the hidden ones, with your own styles

  • Work with common table capabilities including sorting, column totals, and row numbering

  • Displays results of most Excel formulas. If a cell value cannot be calculated due to an unknown formula, the cell displays #N/A in the resulting table. Only cell values with known calculation results are displayed in the table.

Basic use

This macro can be deployed using one of the following methods:

Selected from the macro browser

Excel

Markup shortcut

{excel}

Screenshot

Parameters

Macro specific parameters

Macro Editor Label

Default

Description

Macro Parameter

Macro Editor Label

Default

Description

Macro Parameter

Output format

html

Specify how the output is displayed. The options are as follows:

  • html - data is rendered as an HTML table

  • wiki - data is rendered in a table with wiki markup

  • unrenderedWiki - data is rendered as text with wiki markup

output

Page for attachment

Current page

Enter the location where the Excel files are available. Since 6.6.0. The following locations are supported:

  • page - Data is read from an attachment to the page specified here; provided that page is in the same space as the page with the macro.

  • space:page - Data is read from an attachment to the specified page that is in the specified space.

page

Name of attachment

Most recent Excel file uploaded to the current page

Enter the name of the attachment. Since 6.6.0. 

  • If the Page for attachment is empty, the attachment specified here is considered to be on the current page.

  • If this field is left empty and if URL to Excel file is not specified, the macro renders data from the most recent Excel file that was uploaded to the current page. 



name

Name of attachment in the path



Specify the name of the attachment in the Confluence home/script directory. Since 6.6.0. 

filename

URL to Excel file



Enter the URL of the Excel file(s) to be displayed. If a valid path is entered here, the macro accesses the given location and processes the content accordingly. 

Use of this parameter may be restricted for security reasons. See your administrator for details.



url

URL user



Enter the user name for URL access through basic authentication.

user

URL user password



Enter the user password for URL access through basic authentication.

password

URL connection timeout



Enter time in milliseconds such that URL connections do not timeout before getting data. Use this to increase the access time needed for slow connections. Note that if a zero is given the connection may wait infinitely.

timeout

Sheets to import



Enter a comma separated list of sheet names to be shown in the order specified here. By default, each sheet in the workbook produces a table. The parameter value can be a comma separated list of sheet names (case sensitive) or sheet numbers (1-based counting).

sheets

File encoding



Enter a file encoding for an external file if different from the default encoding. If left empty, default Confluence file encoding is used. Refer to this article for more information. Since 4.1.0.

Example: UTF-8.

encoding

Language for number and date formats



Enter a language specification to use the respective number and date formats for data conversion. This specification is used before the default languages are automatically used. Valid values are 2 character ISO 639-1 alpha-2 codes.

language

Country for number and date formats



Enter a country specification to use the respective number and date formats for data conversion. Used in combination with the Language for number and date formats parameter. Valid values are 2 character ISO 3166 codes.

country

Columns to show



Enter a comma separated list of column numbers to be displayed in the order specified here. By default, all non-hidden columns are displayed in its existing order. Columns are enumerated starting at 1. If columns are specified, even hidden columns are shown. 

Rearrangement of columns, that is, column ordering is not supported. Refer to XL-63 for updates.



columns

Show hidden sheets, rows, and columns

false

Enable this option to show hidden elements of the worksheet.

showHidden

Show sheet name before the table

false

Enable this option to display the worksheet name above the table.

showSheetName

Use cell properties for formatting

false

Enable this option to process each cell for special properties. Currently, supported properties are:

  • html - Alignment, font, and background color.

  • wiki - None at this time for individual cells. For columns, the Use column information from Excel sheet parameter can be used. Another alternative is to use Column attributes from common table parameters.

formatCell

Use column information from excel sheet

true

Disable this option to ignore the column formatting information specified in the Excel sheet. By default, the format for a column specified in the Excel sheet is used to apply formatting for all cells in the column.



formatColumn

Show non-formatted version of generated wiki

false

Enable this option to show a non-formatted version of the wiki table following the formatted table. This is used to help resolve formatting issues. It can also be used to convert Excel to Confluence markup with cut and paste method.

showWiki

Escape special wiki characters

false

Enable this option to allow these special characters (like '|', '[', ']', '{', '}') to be escaped so that the table format remains unaffected. This option works when a wiki output is requested (Output format is wiki) as some special characters in data can cause incorrect table formatting. The default is false so that the data that has wiki markup can be handled correctly.

escape

Include cell hyperlinks

true

Disable this option to display any hyperlinks in the data as normal text. By default, any hyperlinks in the data are retained as is.

hyperlinks

Ignore trailing blank rows

true

Disable this option to show blank rows; a row is considered blank if all the columns specified in Columns to show parameter are blank.

ignoreTrailingBlankRows

Ignore trailing blank columns

true

Disable this option to show blank columns.

ignoreTrailingBlankColumns



Common table parameters

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.