Child pages
  • Using Confluence Excel macro with pages created by ConfiForms app

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.

In this tutorial you will learn how to

  • how to create a form which will take excel file as an input and stores it as an attachment in Confluence
  • how to create pages with ConfiForms IFTTT macro which will show the uploaded file using built in excel macro automatically

NB, You will need https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor plugin (free) to complete the tutorial. As you have to set the excel macro parameters using the Storage Format editor, because setting dynamic variables via macro dialog is not supported.

If you are new to ConfiForms, please take a few minutes to read the Basic concepts Guide, or go through the video tutorial on that page.  (smile)

Since version 1.9.20 of ConfiForms we have added support for using built-in Excel macro (and other Office documents related macros) inside ConfiForms IFTTT.
Here is how you can built a solution which accepts uploading excel files and storing them as attachments and creating a page per file to show the uploaded excel file contents.

Let's start with the ConfiForms Form definition.
We will have only one field in the form and it will be of type "File"
And the form will have an IFTTT macro rule to create a Confluence page when the record is created

The configuration for the form will look like
So, you can see we have a ConfiForms form, one registration control to enable creating new records, and a field named "excel" of type "file"
Also the form has an IFTTT macro inside which creates a page when new record is saved and shows the file uploaded using the excel macro
This is how the form looks like in view mode
The interesting and most important part is how the excel macro is configured
Let's see it contents using the storage format viewer (You will need a https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor plugin to complete the tutorial)
The important part here is highlighted, you can see that "filename" is set to [entry.excel], which will be dynamically substituted to the uploaded file name when the page is created.
You can see that the page parameter is set to point at current page, this is important. As this link will be correctly substituted to point at original page (at current page), not at the page created
And we have also included the space parameter to set the Confluence space explicitly  (we have our page in TEST space)


In some case you will need to update the "view-file" macro's "page" parameter to be

<ac:parameter ac:name="page"> 
      <ac:link> 
        <ri:page ri:content-title="[entry._page.title]"/> 
      </ac:link> 
    </ac:parameter>  

and remove the "space" parameter (if the page is created in the same Confluence space)


And the result is as follows (we have set a naming convention for created pages to "page with excel [entry.dateCreatedFormatted]", as you may see in the storage format above)