Search

Module: Editor

Version: 18.02 +

Type: String

Category: Conversion

Description

The formula 'Convert.Excel.to.XML' converts data in a named Range in an Excel-file to XML. It is possible to read an Excel workbook from the filesystem, or read it as a base64 string.

Parameters

Excel file:

In the parameter 'Excel file' comes the full path to the Excel file as a text string. From version 18.11 onwards, it is also possible to enter a base64 string representing an Excel workbook.

RangeName:

The name of the Range in Excel that contains the data you want to convert to XML.

DataElementName:

This is the name used in the top XML element.

RowElementName:

This is the name used in for the top row element in XML.

IncludeDataType:

This parameter can be True or False. Here you can specify whether to include the data type of the cells as an attribute to the XML elements or not. With this functionality you can detect what data types the cells have. Possible data types are double, date, boolean and string.

Example

Description

You can see below what possible parameters for the formula 'Convert.Excel.to.XML' are.

Values parameters

Excel file:

Path to the Excel-file

RangeName:

'TestRange'

DataElementName:

TopElement (Title)

RowElementName:

ChildElement

IncludeDataType:

False

Result

The result is a XML-file that can be used in the editor as input.

Remarks

The formula will return an exception if:

  • The defined Excel file does not exist or is not accessible
  • The Excel range contains an error
  • The Excel range consists of non-consecutive ranges
  • The defined RangeName does not exist within the Excel file

Behavior of the formula:

  • Empty cells within de defined range will be converted to empty xml elements with data type string
  • Cells that are formatted as a date will be converted to a date with format YYYY-MM-DD
  • Cells that contain HTML code will be converted to an escaped string

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2018-11-15