# CSVTORANGE

#### Syntax

**CSVTORANGE**(*csvText*; *columnDelimiter*; *rowDelimiter*; *option*)

* *csvText -* the csv text which should be converted to a range - ***Value type**: text*
* *columnDelimiter* - the character which separates cell values column-wise - ***Value type**: text (optional, default value: “;”)*
* *rowDelimiter* - the character which separates cell values row-wise - ***Value type**: text (optional, default value:* CHAR(13) & CHAR(10) - i.e. a line brea&#x6B;*)*
* *option* - option to escape delimiters in the cell values - ***Value type**: constant (optional, default value:* <mark style="color:red;">escaping</mark>*)*\
  Possible values are:
  1. *<mark style="color:red;">noescaping</mark>* - delimiter characters in cell values are not converted
  2. <mark style="color:red;">escaping</mark> - delimiter characters in cell values are converted (see remarks)

#### Remarks

1. To apply special characters like tab, carriage return or line feed, use the function **CHAR** for the delimiters (see example below).
2. If *option* is *escaping,* the delimiter characters are escaped (converted) in the following way:
   1. all double quotes of all texts in range are automatically replaced with two double quotes.
   2. if a cell value contains one of the two delimiters or a double quote.
   3. the cell value is automatically enclosed with double quotes.

#### Examples

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-15758ea6cabb7fcd5b25b635d1f0aa5c470177b8%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-600f91d2397779956f0b722a36ba15f74fe8acd1%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-3cdeba50f5ec5b299e61c224584bba4d2c7a3aa7%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>
