# Create

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.CSV2/tree/main/Frends.CSV.Create>

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

| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| InputType : `CreateInputType`      | <p>Select input type to show correct editor for input</p><p>Possible values:</p><ul><li><code>List</code>:</li></ul><p>Select input type to show correct editor for input</p><ul><li><code>Json</code>:</li></ul><p>Select input type to show correct editor for input</p><ul><li><code>Xml</code>:</li></ul><p>Select input type to show correct editor for input</p><p><br>Default: <code>0</code><br>Example: <code>CreateInputType.List</code></p> |
| Delimiter : `String`               | <p>Delimiter.</p><p><br>Default: <code>";"</code><br>Example: <code>;</code></p>                                                                                                                                                                                                                                                                                                                                                                       |
| Json : `String`                    | <p>Json string to write to CSV.</p><p>Must be an array of objects.</p><p><br>Default: <code>-</code><br>Example: <code>\[{"Column1": "row1Val1","Column2": "row1Val2"},{"Column1": "row2Val1","Column2": "row2Val2"}]</code></p>                                                                                                                                                                                                                       |
| SpecifyColumnsManually : `Boolean` | <p>If set true, allows the user to manually specify an array of columns which to generate.</p><p><br>Default: <code>false</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                    |
| Columns : `List<String>`           | <p>Custom columns for the data.</p><p><br>Default: <code>-</code><br>Example: <code>{ "Column1", "Column2", "Column3" }</code></p>                                                                                                                                                                                                                                                                                                                     |
| Xml : `String`                     | <p>Xml string to write to CSV.</p><p><br>Default: <code>-</code><br>Example: <code>Veijo FrendsStr 2018-05-27T00:00:00 Hodor HodorsStr 2018-01-01T00:00:00</code></p>                                                                                                                                                                                                                                                                                  |
| XmlNodeElementName : `String`      | <p>Name of the node from which the data is to be queried.</p><p><br>Default: <code>-</code><br>Example: <code>book</code></p>                                                                                                                                                                                                                                                                                                                          |
| Headers : `List<String>`           | <p>Headers for the data.</p><p>Need to be in the same order as the underlying data</p><p><br>Default: <code>-</code><br>Example: <code>{ Values, Foos, Bars, Dates }</code></p>                                                                                                                                                                                                                                                                        |
| Data : `List<List`1>\`             | <p>Data to write to the CSV string.</p><p>Needs to be of type List\<List>.The order of the nested list objects need to be in the same order as the header list.<br>Default: <code>-</code><br>Example: <code>{ 1, "foo", "bar", 2023-02-08 }</code></p>                                                                                                                                                                                                |
| {% endtab %}                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

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

| Name                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                                                       |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| CultureInfo : `String`                 | <p>The culture info to read/write the entries with, e.g. for decimal separators.</p><p>InvariantCulture will be used by default.</p><p>See list of cultures here: <https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.name?view=net-7.0></p><p>NOTE: Due to an issue with the CsvHelpers library, all CSV tasks will use the culture info setting of the first CSV task in the process; you cannot use different cultures for reading and parsing CSV files in the same process.                                                                                      | </p><p><br>Default: <code>-</code><br>Example: <code>fi-FI</code></p> |
| IncludeHeaderRow : `Boolean`           | <p>This flag tells the writer if the header row should be written.</p><p><br>Default: <code>true</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                        |                                                                       |
| NeverAddQuotesAroundValues : `Boolean` | <p>If set true, CSV's fields are never put in quotes</p><p><br>Default: <code>false</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                                                                       |
| ReplaceNullsWith : `String`            | <p>Input's NULL values will be replaced with this value.</p><p><br>Default: <code>-</code><br>Example: <code>foo</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                                                       |
| BooleanFormat : `BooleanFormat`        | <p>Specifies the string representation format for boolean values in the CSV output.</p><p>Possible values:</p><ul><li><code>Lowercase</code>:</li></ul><p>Specifies the string representation format for boolean values in the CSV output.</p><ul><li><code>PascalCase</code>:</li></ul><p>Specifies the string representation format for boolean values in the CSV output.</p><ul><li><code>Numeric</code>:</li></ul><p>Specifies the string representation format for boolean values in the CSV output.</p><p><br>Default: <code>0</code><br>Example: <code>BooleanFormat.Lowercase</code></p> |                                                                       |
| {% endtab %}                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                       |

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

| Name                | Description                                                             |
| ------------------- | ----------------------------------------------------------------------- |
| Success : `Boolean` | <p>Operation complete without errors.<br>Example: <code>true</code></p> |
| CSV : `String`      | <p>CSV string.<br>Example: <code>First;Second;"foo";"bar"</code></p>    |
| {% endtab %}        |                                                                         |

{% tab title="Changelog" %}

## Changelog

### \[1.11.0] - 2026-01-27

#### Added

* Added BooleanFormat option to customize boolean output format in CSV (lowercase, PascalCase, or numeric).

### \[1.10.0] - 2026-01-23

#### Fixed

* Empty JSON input now returns empty string instead of throwing exception

### \[1.9.0] - 2025-12-05

#### Changed

* Update package CsvHelper to version 33.1.0.

### \[1.8.0] - 2025-11-12

#### Changed

* Updated CsvHelper to version 33.0.1.

### \[1.7.0] - 2025-10-29

#### Fixed

* Improve the memory efficiency of parsing Json.

### \[1.6.0] - 2025-10-06

#### Changed

* Updated Repository link in the metadata.

### \[1.5.0] - 2024-10-11

#### Fixed

* Fixed issue with JSON properties having spaces in property names.

### \[1.4.0] - 2024-08-20

#### Added

* Updated NewtonSoft.Json to the latest version 13.0.3.

### \[1.3.0] - 2024-08-12

#### Added

* Added option to specify headers manually when creating a CSV from Json.

### \[1.2.0] - 2024-05-06

#### Added

* Input Json can be Array or Object
* Json can have nested properties
* Json can handle array properties

### \[1.1.0] - 2023-07-27

#### Added

* Added option to create csv from xml input.
* Added new Input parameters: Xml and XmlNodeElementName which are part of the new implementation.

### \[1.0.0] - 2023-02-09

#### Added

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