# 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="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-60f443fc78b96d8d1cf3c9584a5ae2c29a1f8732%2Fgrafik.png?alt=media" 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="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-599b7a56539a9b13c9b2583216c5078eb59bba8a%2Fgrafik%20(302).png?alt=media" 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.
