# CreateFromCsv

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

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

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

| Name                            | Description                                                                                                                   |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| SourcePath : `String`           | <p>Path to the .csv file.</p><p><br>Default: <code>-</code><br>Example: <code>C:/workdir/data.csv</code></p>                  |
| SheetName : `String`            | <p>Name of the sheet to write to.</p><p><br>Default: <code>-</code><br>Example: <code>FirstSheet</code></p>                   |
| Delimiter : `String`            | <p>Delimiter.</p><p><br>Default: <code>;</code><br>Example: <code>;</code></p>                                                |
| DestinationFileName : `String`  | <p>Name of the file to write to.</p><p><br>Default: <code>-</code><br>Example: <code>MyNewData</code></p>                     |
| DestinationDirectory : `String` | <p>Path to the folder where the file will be saved.</p><p><br>Default: <code>-</code><br>Example: <code>C:/results</code></p> |
| {% endtab %}                    |                                                                                                                               |

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

| Name                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ContainsHeaderRow : `Boolean`       | <p>This flag tells the reader if there is a header row in the CSV string.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                             |
| TrimValues : `Boolean`              | <p>This flag tells the reader to trim whitespace from the beginning and ending of the field value when reading.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                       |
| SkipRowsFromTop : `Int32`           | <p>If the CSV string contains metadata before the header row,</p><p>you can set this value to ignore a specific number of rows from the beginning of the csv string.</p><p><br>Default: <code>0</code><br>Example: <code>2</code></p>                                                                                                                                                                                        |
| SkipEmptyRows : `Boolean`           | <p>A flag to let the reader know if a record should be skipped when reading if it's empty.</p><p>A record is considered empty if all fields are empty.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                              |
| IgnoreQuotes : `Boolean`            | <p>A flag to let the reader know if quotes should be ignored.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                       |
| AdjustColumnsToContents : `Boolean` | <p>Adjusts the width of all columns based on their content.</p><p>Enabling this may cause high memory usage.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                        |
| FileExistAction : `FileExistAction` | <p>What to do if the output file already exists.</p><p>Possible values:</p><ul><li><code>Throw</code>:</li></ul><p>What to do if the output file already exists.</p><ul><li><code>Overwrite</code>:</li></ul><p>What to do if the output file already exists.</p><ul><li><code>Rename</code>:</li></ul><p>What to do if the output file already exists.</p><p><br>Default: <code>-</code><br>Example: <code>Throw</code></p> |
| ThrowErrorOnFailure : `Boolean`     | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                              |
| ErrorMessageOnFailure : `String`    | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                                                                                                                                                                                                                                                                                               |
| {% endtab %}                        |                                                                                                                                                                                                                                                                                                                                                                                                                              |

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

| Name                  | Description                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Success : `Boolean`   | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                             |
| OutputPath : `String` | <p>Path to the output file.<br>Example: <code>C:/results/MyNewData.xlsx</code></p>                                             |
| Error : `Error`       | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p> |
| {% endtab %}          |                                                                                                                                |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2026-02-23

#### Fixed

* Ensure FrendsTaskMetadata.json is included in NuGet package

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

#### Added

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