# RANGETOCSV

#### Syntax

**RANGETOCSV**(*range*; *columnDelimiter*; *rowDelimiter*; *option*)

* *range* - the range which should be converted to a csv text - ***Value type**: range with cells of 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. *rowDelimiter* can be *empty*, then only the single rows of *range* are concatenated into a column range.
2. To apply special characters like tab, carriage return or line feed, use the function **CHAR** for the delimiters (see example below).
3. 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="/files/65BrYayBhSP2Wqd9JwBO" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/PQCw4GhZgJpGPhjzkzVT" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/iXV0aiJJ8q0lIgAVTovT" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/range-functions/rangetocsv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
