# DOWNLOAD

#### Syntax <a href="#syntax.15" id="syntax.15"></a>

**DOWNLOAD**(*text*; *fileName*)

* *text* - non-formatted text, as content of the file to be downloaded - ***Value type**: text*
* *fileName* - the name of the file to be downloaded - ***Value type**: text*

#### Remarks <a href="#examples.1" id="examples.1"></a>

* Calling this function uses the standard download processing of the browser to store the file on the local computer.
* The function returns !ERROR in case that any error occurs (e.g. the maximum allowed file size is exceeded, or *fileName* is not a valid file name).
* In the combination with RANGETOCSV, the DOWNLOAD function can be used to store the content of any table widget on the client computer.

#### Examples <a href="#examples.1" id="examples.1"></a>

Clicking on the "Download" button saves the file with name "myFile.txt" and the text content "Lorem ipsum..." on the client computer.

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

In combination with RANGETOCSV, the DOWNLOAD function can be used to store the content of any table widget on the client computer. The formula of the "Download" button is here analogue to the previous example: DOWNLOAD(#cell2; "myFile.txt")

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

**Note**: With the functions UPLOAD and CSVTORANGE, this file can used to restore the content of this or another table widget at a later time.


---

# 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/import-export-functions/download.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.
