InterFormNG2 can convert input Excel files (.xlsx) into XML with the workflow component, Excel to XML. The input files are converted into the XML format as described below.
XML files with the format below can be converted back into Excel files with the workflow component, XML to Excel.
The Excel file is internally in InterFormNG2 represented by an XML with this structure:
excel
This is the root element of the XML document.
Child tag | Type | Count | Description |
---|---|---|---|
<styles> | node | 0..1 | List of styles used in the Excel document |
<styles> | node | 0..1 | List of styles used in the Excel document |
styles
List of styles used in the Excel document
Child tag | Type | Count | Description |
---|---|---|---|
<style> | node | 0..many | Contains a style used in the Excel document |
style
One style, used in the Excel document. The style can be used in several columns. If nothing is specified, default Excel values are used.
Child tag | Type | Count | Description |
---|---|---|---|
<name> | String | 1 | The reference name for this style, used in <style> tag inside columns |
<fillColor> | Hex color | 0..1 | Fills the background of a cell. Color values are RRGGBB or #RRGGBB HTML colors. |
<dataFormat> | String | 0..1 | Adds a format for a specific cell. For values it is recommended to setup the value in excel, convert to XML and then grap the format. |
<textColor> | String | 0..1 | Changes the color of the text inside a column. |
<fontName> | String | 0..1 | Sets the used font. The font name must be spelled in the same way as inside Excel. |
<fontSize> | integer | 0..1 | Sets the font size in points. |
<bold> | Boolean | 0..1 | Defines if the text is in bold |
<italic> | Boolean | 0..1 | Defines if the text is in italic |
<underline> | Boolean | 0..1 | Defines if the text is underlined |
<align> | String | 0..1 | Defines the alignment of the text. Possible values are: LEFT, CENTER, RIGHT |
<borderTop> | String | 0..1 | Defines the top border, possible values are: NONE, THIN, MEDIUM, DASHED, DOTTED, THICK, DOUBLE, HAIR, MEDIUM_DASHED. DASH_DOT, MEDIUM_DASH_DOT, DASH_DOT_DOT, MEDIUM_DASH_DOT_DOT, SLANTED_DASH_DOT |
<borderBottom> | String | 0..1 | Defines the bottom border. |
<borderLeft> | String | 0..1 | Defines the left border. |
<borderRight> | String | 0..1 | Defines the right border. |
<borderTopColor> | String | 0..1 | Defines the top border color, use hex colors in the format RRGGBB or #RRGGBB |
<borderBottomColor> | String | 0..1 | Defines the bottom border color. |
<borderLeftColor> | String | 0..1 | Defines the left border color. |
<borderRightColor> | String | 0..1 | Defines the right border color. |
sheets
Contains a list of sheets.
Child tag | Type | Count | Description |
---|---|---|---|
<sheet> | node | 0..many | Contains an Excel sheet |
sheet
Contains a single Excel sheet.
Child tag | Type | Count | Description |
---|---|---|---|
<name> | node | 0..1 | Sets the name of the sheet. If not filled SheetX is used, where X is the sheet number. |
<columnWidths> | node | 0..1 | List of widths used for the columns in the sheet |
<rows> | node | 0..1 | List of rows used in this sheet |
columnWidths
Child tag | Type | Count | Description |
---|---|---|---|
<width> | integer | 0..many | Sets the width of a column. The widths are ordered. First width child is column A, second is column B etc. |
rows
Child tag | Type | Count | Description |
---|---|---|---|
<row> | node | 0..many | A row in this sheet. |
row
Child tag | Type | Count | Description |
---|---|---|---|
<y> | integer | 0..1 | The y column (0 based), e.g. y=5 will be the row with column A6, B6, C6... If not filled, position will be last rows Y+1 (or 0 if first row) |
<height> | integer | 0..1 | Sets the height in points for the row. |
<columns> | node | 0..many | List of columns in this row |
columns
Child tag | Type | Count | Description |
---|---|---|---|
<column> | node | 0..many | A column in this row. |
column
Defines a single column/cell inside the row. Only one text or formula or number is allowed in each column. (Any extra is ignored).
Child tag | Type | Count | Description |
---|---|---|---|
<name> | String | 0..1 | A name for usage inside ranged formula functions, e.g. SUM(). |
<style> | String | 0..1 | Reference to which style to use (Defined in a <style> tag). |
<text> | String | 0..1 | Text content of a column. |
<formula> | String | 0..1 | Formula content of a column (Must be a valid formula). |
<number> | Double | 0..1 | Decimal content of a column. |
<x> | integer | 0..1 | The x coordinate of the column. (0 based, 0 is column A, 1 is column B).If not defined, x is last column+1 (or zero if first column). |
imageURL | String | 0..1 | Defines an URL to an image, all special NG2 urls also works (e.g. resources://). |
hyperlink | String | 0..1 | Makes the column a link. |