# ConvertToXML

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.Excel/tree/main/Frends.Excel.ConvertToXML>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name            | Description                                                                                                                         |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Path : `String` | <p>Path to the Excel file.</p><p><br>Default: <code>C:\tmp\ExcelFile.xlsx</code><br>Example: <code>C:\tmp\ExcelFile.xlsx</code></p> |
| {% endtab %}    |                                                                                                                                     |

{% tab title="Parameter: Options" %}

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ReadOnlyWorkSheetWithName : `String`  | <p>If empty, all work sheets are read.</p><p><br>Default: <code>-</code><br>Example: <code>Sheet2</code></p>                                                                                                                                                                                                                                                                                               |
| UseNumbersAsColumnHeaders : `Boolean` | <p>If set to true, numbers will be used as column headers instead of letters (A = 1, B = 2...).</p><p><br>Default: <code>false</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                   |
| ThrowErrorOnFailure : `Boolean`       | <p>Choose if exception should be thrown when conversion fails.</p><p><br>Default: <code>true</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                      |
| DateFormat : `DateFormats`            | <p>Date format selection.</p><p>Possible values:</p><ul><li><code>DEFAULT</code>:</li></ul><p>Date format selection.</p><ul><li><code>DDMMYYYY</code>:</li></ul><p>Date format selection.</p><ul><li><code>MMDDYYYY</code>:</li></ul><p>Date format selection.</p><ul><li><code>YYYYMMDD</code>:</li></ul><p>Date format selection.</p><p><br>Default: <code>0</code><br>Example: <code>Default</code></p> |
| ShortDatePattern : `Boolean`          | <p>If set to true, dates will exclude timestamps from dates.</p><p>Default false</p><p><br>Default: <code>false</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                  |
| {% endtab %}                          |                                                                                                                                                                                                                                                                                                                                                                                                            |

{% tab title="Result: Result" %}

| Name                    | Description                                                                                                           |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`     | <p>Conversion's status. False if conversion fails.<br>Example: <code>false</code></p>                                 |
| XML : `String`          | <p>Excel-conversion to CSV.<br>Example: <code>workbook\_name, worksheet\_name, row\_header, column\_header</code></p> |
| ErrorMessage : `String` | <p>Exception message.<br>Example: <code>Error while converting Excel file to XML</code></p>                           |
| {% endtab %}            |                                                                                                                       |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2026-01-22

#### Fixed

* Open Excel files with FileAccess.Read to support read-only files

### \[1.0.2] - 2023-08-01

#### Fixed

* Fixed Options.ShouldReadSheet method to check if the Sheet name equals to the given name.

### \[1.0.1] - 2022-08-10

#### Change

* Documentation updates

### \[1.0.0] - 2022-02-24

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
