Convert Excel to Structured XML document with nested levels

This article describes flexible possibilities of converting an Excel file into a structured XML format with nested levels.

Generic Excel to XML Converter

Excel file represents the table data format as it is storing data in the columns and rows.

Each cell in the Excel file is represented by a column name (like A, B, C, etc) and by a row number, like (1, 2, 3, etc).

In most cases, the table in the Excel file has titles for each column, and this information can be used for our conversion. These titles are usually placed in the very first row.

Example of the spreadsheet.Sample Excel file

Conversion Tools offers a generic Excel to XML Converter, which can be found at https://conversiontools.io/convert/excel-to-xml.

Using Excel to XML Converter, it is possible to convert Excel files into a flat XML structure - see sample file below.

Example of the XML file with a flat structure:

Sample XML file with a flat structure

Custom Excel to XML Converter

At Conversion Tools, we have a wide range of possibilities on how to use the converters, because some of the converters was developed as our own software solution.

One of the use-cases would be - to customize the output of the Excel to XML conversion.

Excel file has a flat table structure, and in some cases, it is required to generate a structured XML document with nested levels of XML nodes.

See the following examples and the explanation about the differences.

Example 1.Sample XML file with a custom structure

In this example:

Price and Publish date has been moved into a separate XML node <extras>
Price is an <option> XML node, with a specified attribute field
Description field is now enclosed into CDATA XML tag to avoid extra formatting
Example 2.Sample XML file with a custom structure

In this example:

Price and Publish date are now placed into separate <options>XML nodes.

As you can see from these examples, the same input Excel file can be transformed differently into structured XML files, based on some predefined rules.

What can be customized?

Document structure
First of all, the output XML document structure can be defined based on the input header fields.
XML field data can be enclosed into the CDATA tag.
It is also possible to define the mapping of the fields, to change the name of the specific input fields when saving into the output document.
Data transformation
Data in XML can be transformed. For example, we can specify the rule, to transform the dates from ISO format into a human-readable format (like MM/DD/YYYY).
Other operations for transforming the data are:
split and combine fields data
data filtering to skip unwanted data
and others

Get a Free Quote

Are you interested in a similar solution of converting files with a customized output?

Get a Free Quote right now by submitting the request using the form below! We usually reply within the next few hours.

Many of our clients already use custom converters on a daily basis - we will be happy to help you in your daily work!

By clicking "Get a Free Quote" button you agree to the Terms of Use and the Privacy Policy.

Success

Your message has been sent. We will contact you soon per E-mail. Thank you.

Error

An error occurred during sending the message. Please come back later.

Share this article with your friends or colleagues!

Convert Excel to Structured XML document with nested levels

This article describes flexible possibilities of converting an Excel file into a structured XML format with nested levels.

Generic Excel to XML Converter

Excel file represents the table data format as it is storing data in the columns and rows.

Each cell in the Excel file is represented by a column name (like A, B, C, etc) and by a row number, like (1, 2, 3, etc).

In most cases, the table in the Excel file has titles for each column, and this information can be used for our conversion. These titles are usually placed in the very first row.

Example of the spreadsheet.Sample Excel file

Conversion Tools offers a generic Excel to XML Converter, which can be found at https://conversiontools.io/convert/excel-to-xml.

Using Excel to XML Converter, it is possible to convert Excel files into a flat XML structure - see sample file below.

Example of the XML file with a flat structure:

Sample XML file with a flat structure

Custom Excel to XML Converter

At Conversion Tools, we have a wide range of possibilities on how to use the converters, because some of the converters was developed as our own software solution.

One of the use-cases would be - to customize the output of the Excel to XML conversion.

Excel file has a flat table structure, and in some cases, it is required to generate a structured XML document with nested levels of XML nodes.

See the following examples and the explanation about the differences.

Example 1.Sample XML file with a custom structure

In this example:

Price and Publish date has been moved into a separate XML node <extras>
Price is an <option> XML node, with a specified attribute field
Description field is now enclosed into CDATA XML tag to avoid extra formatting
Example 2.Sample XML file with a custom structure

In this example:

Price and Publish date are now placed into separate <options>XML nodes.

As you can see from these examples, the same input Excel file can be transformed differently into structured XML files, based on some predefined rules.

What can be customized?

Document structure
First of all, the output XML document structure can be defined based on the input header fields.
XML field data can be enclosed into the CDATA tag.
It is also possible to define the mapping of the fields, to change the name of the specific input fields when saving into the output document.
Data transformation
Data in XML can be transformed. For example, we can specify the rule, to transform the dates from ISO format into a human-readable format (like MM/DD/YYYY).
Other operations for transforming the data are:
split and combine fields data
data filtering to skip unwanted data
and others

Get a Free Quote

Are you interested in a similar solution of converting files with a customized output?

Get a Free Quote right now by submitting the request using the form below! We usually reply within the next few hours.

Many of our clients already use custom converters on a daily basis - we will be happy to help you in your daily work!

By clicking "Get a Free Quote" button you agree to the Terms of Use and the Privacy Policy.

Success

Your message has been sent. We will contact you soon per E-mail. Thank you.

Error

An error occurred during sending the message. Please come back later.

Share this article with your friends or colleagues!