Internal Excel format

Internal Excel format

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.

 

Simple overview of the primary structure

The Excel file is internally in InterFormNG2 represented by an XML with this structure:

 

NG2ExcelInternalFormat01

 

 

Elements

 

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.

    • Related Articles

    • EXCEL

      EXCEL is one of the file types, that can be handled as input in the workflow. Only input excel files in the format, .xlsx is supported. The excel files can e.g. be converted into xml with the component, Excel to XML.
    • XML to Excel

      The advanced, create document workflow component, XML to Excel is described below. This is a workflow component, that accepts a special formatted input XML file (that defines the Excel layout) and converts this into an Excel file in the payload. ...
    • Excel to XML component

      The advanced, converter workflow component, Excel to XML converts an input excel file in the .xlsx format into the special XML format. The converter handles rows, columns and the most important styles. A related workflow component can create an ...
    • Excel designer

      Excel Support It is possible to generate Excel output in InterFormNG2, and it is also possible to convert Excel files into XML. You need however to have a license for InterFormNG2, that includes the Excel functionality, which can be support for ...
    • Excel cells

      In order to add data in the Excel output in the Excel designer, then you need to insert at least one cell. A cell can only be inserted within a row and a row can only be inserted within a sheet. This section contains these topics: 1.Create a cell. ...