[Yandex Cloud documentation](../../../index.md) > [Yandex DataLens](../../index.md) > Connections > Files and services > Creating a connection to Yandex Documents

# Creating a connection to Yandex Documents


To create a connection to Yandex Documents:

1. Open the [connection creation page](https://datalens.ru/connections/new).
1. Under **Files and services**, select the **Yandex Documents** connection.
1. Add files depending on access permissions:

   {% list tabs %}

   - Public

     1. Click **Add file** and navigate to the `Public` tab.
     1. Go to the [service](https://docs.yandex.ru/docs?type=xlsx) page.
     1. Right-click the required file and select **Share**. Click **Copy**.

        {% note info %}

        You can also get a link to the file in Yandex Disk. For more information, see [this guide](https://yandex.com/support/disk/share/sharing.html#how-to-share).

        {% endnote %}

     1. In DataLens, paste the link into the `Link to file in Yandex Documents` field and click **Add**.
     1. If the file you are uploading contains several sheets, specify the ones you want to upload, or select all available. Each sheet is uploaded to a separate table.
     1. Click **Add**. Information about this file and the data to upload will appear at the center of the screen.

   - Private

     {% note info %}
     
     Adding password-protected private files is not supported. 

     {% endnote %}

     1. On the connection page in DataLens, click **Add file** and navigate to the `Private` tab.
     1. On the tab, you will see a Yandex Documents authorization message. If authorized, proceed to the next step. If not, complete authorization:
         1. Click **Log in**.
         1. Select a Yandex account to log in to Yandex Documents.
         1. Allow **DataLens** to access your Yandex account. Click **Next**.
     1. Specify the **Path to file in Yandex Documents** relative to the root directory. Omit `/disk` at the beginning. You can view the file location in Yandex Documents: open the file and go to **File** → **Table details**.
     1. Click **Add**.
     1. If the file you are uploading contains several sheets, specify the ones you want to upload, or select all available. Each sheet is uploaded to a separate table.
     1. Click **Add**. Information about this file and the data to upload will appear at the center of the screen.

        To log out of your Yandex account, open the connection page and click ![image](../../../_assets/console-icons/arrow-right-from-square.svg) next to the **You are authorized in Yandex Documents** button. Confirm token revocation. The sheets from the files with restricted access will no longer be displayed.

   {% endlist %}

1. Set the **Show column headers** option to **Yes** or **No**.
1. Optionally, enable automatic updates for spreadsheet data. To do this, in the top-right corner, select **Update automatically**. Spreadsheet data will be updated every 30 minutes or less often. To update your data manually, click **Update data**.
1. Click **Create connection**.


1. Select a [workbook](../../workbooks-collections/index.md) to save your connection to or create a new one. If using legacy folder navigation, select a folder to save the connection to. Click **Create**.


1. Enter a name for the connection and click **Create**.

You can add, rename, and delete files in the connection.

## Additional settings {#additional-settings}

You can limit data export from charts based on this connection. To do this, click ![icon](../../../_assets/console-icons/gear.svg) at the top right and uncheck **Allow data export**. With this option disabled, for charts based on the respective connection, the export data option will not be available in their ![icon](../../../_assets/console-icons/ellipsis.svg) menu. However, you will still be able to copy chart data and take screenshots.

## Limits {#restrictions}

Consider the following limitations when creating a connection to Yandex Documents:

* Currently, you can only upload `xlsx` files.
* Maximum number of table sheets per connection: 10. When creating a connection, all sheets will be loaded, but you can only select ten of them to work with at the same time.
* Maximum size per sheet: 200 MB.
* Maximum number of columns per sheet: 300.
* Minimum number of rows per spreadsheet: 2. In a spreadsheet with one row, you cannot identify column types as you cannot tell a header from a data row.
* The link to the file in Yandex Documents must be formatted as `https://disk.yandex.ru/i/id`. If the link contains `/d` instead of `/i`, you will get an error. [What to do in case of the _Invalid link format_ error](../../qa/connections.md#yadocs-error-link)