Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.


Since version 1.53.4 we have introduced couple of experimental APIs which help you to make a bridge between ConfiForms web-services backed fields and Excel files attached to your Confluence page.

These 2 APIs are available at the following URLs:


Services expect/support the following parameters:

ParameterDescriptionTypeRequired
attachmentIdAttachment ID of the Excel file attachment to use as sourceNumericYes
skipRowsNumber of rows to skip (from the top). Defaults to 0 rows to skipNumericNo
idCellNumWhich column to use as IDNumericNo
labelCellNumWhich column to use as labelNumericNo

Column and rows numbering starts with 0


NB! Only first sheet in excel file is currently supported!


Examples:

https://YOUR_CONFLUENCE_SERVER/ajax/confiforms/rest/excel-2json.action?attachmentId=2195459&skipRows=1&idCellNum=0&labelCellNum=1

https://YOUR_CONFLUENCE_SERVER/ajax/confiforms/rest/excel2007-2json.action?attachmentId=2195460&skipRows=1

Last example reads ALL the rows and columns (skipping just the first one) and creates a structure similar to the one listed below

[
  {
    "cell2": "uno",
    "cell3": "in cell 3",
    "cell1": "1"
  },
  {
    "cell2": "duo",
    "cell1": "2"
  },
  {
    "cell2": "tres",
    "cell3": "here is cell three",
    "cell1": "3"
  },
  {
    "cell2": "four",
    "cell1": "4"
  },
  {
    "cell2": "five",
    "cell1": "5"
  },
  {
    "cell2": "six",
    "cell1": "6"
  }
]

From the following excel file

As you can see, we can create a JSON Array structure that perfectly fits our ConfiForms web-service enabled fields

So, here is how you can create a ConfiForms Form which uses this file and shows it's values in the dropdown



  • No labels