---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/workbooks-collections/export-and-import
  - ru/workbooks-collections/export-and-import
  - href: en/workbooks-collections/export-and-import.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/workbooks-collections/export-and-import.html
title: Exporting and importing workbooks DataLens On-premises
description: Follow this guide to export and import DataLens On-premises workbooks.
vcsPath: en/workbooks-collections/export-and-import.md
---

# Exporting and importing workbooks DataLens On-premises

In DataLens, you can transfer [workbooks](./index.md) between installations using export and import tools. For example, you can export a ready-made workbook with its settings and connections from the cloud DataLens On-premises to an on-premise installation.


{% note info %}

* You can only export and import workbooks.
* Export is available to users with the `datalens.admin` role.
* Import is available to users who have permissions to create a new workbook.

{% endnote %}



## Exporting a workbook {#export-workbook}

To export a workbook:

1. In the left-hand panel, select <!-- diplodoc:svg ![collections](../_assets/console-icons/rectangles-4.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.5 3h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zm9-.5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zm-3 6.5h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5m-2-1.5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2zm7 1.5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2z" clip-rule="evenodd"/></svg> **Collections and workbooks**.
1. Use one of the following methods to start exporting the workbook you need:
   
   * Next to the workbook, click <!-- diplodoc:svg ![image](../_assets/console-icons/ellipsis.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" clip-rule="evenodd"/></svg> → <!-- diplodoc:svg ![icon](../_assets/console-icons/file-arrow-up.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM5.47 8.72a.75.75 0 0 0 1.06 1.06l.72-.72v2.19a.75.75 0 0 0 1.5 0V9.06l.72.72a.75.75 0 0 0 1.06-1.06l-2-2a.75.75 0 0 0-1.06 0z" clip-rule="evenodd"/></svg> **Export**.
   * Open the workbook and click <!-- diplodoc:svg ![image](../_assets/console-icons/ellipsis.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" clip-rule="evenodd"/></svg> → <!-- diplodoc:svg ![icon](../_assets/console-icons/file-arrow-up.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM5.47 8.72a.75.75 0 0 0 1.06 1.06l.72-.72v2.19a.75.75 0 0 0 1.5 0V9.06l.72.72a.75.75 0 0 0 1.06-1.06l-2-2a.75.75 0 0 0-1.06 0z" clip-rule="evenodd"/></svg> **Export** at the top.

1. Click **Export**. You can see the progress in the indicator. Note the following:

   * Workbooks are exported to a JSON file.
   * This may take a few minutes.
   * Sensitive [connection](../concepts/connection/index.md) data is not saved. During [import](#import-workbook), the user will have to set up connections again, e.g., specify a token or enter a password.   
   * Other DataLens versions may not support certain connection types. During import, such connection will not work.
   
   If you try to close the indicator window before the export is complete, you will get the cancel export warning. Select:

   * **Return** to continue the export.
   * **Cancel export** to stop it.
   
Once the export is complete, you may get [warnings](./export-import-notifications.md#export-notifications) with workbook details and a list of objects requiring attention. To download the export file in JSON format, click **Download**.

{% note tip %}

You can edit the exported JSON file, e.g., add a password for a connection. However, DataLens does not guarantee successful import and correct operation of the workbook if you manually edit its configuration. We recommend that you carefully review all changes before import to mitigate possible issues.

{% endnote %}

If the workbook export fails, you will get an error [message](./export-import-notifications.md#export-notifications). Try to fix the error and re-export the workbook.

## Importing a workbook {#export-workbook}

To import a workbook:

1. In the left-hand panel, select <!-- diplodoc:svg ![collections](../_assets/console-icons/rectangles-4.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.5 3h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zm9-.5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zm-3 6.5h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5m-2-1.5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2zm7 1.5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5m-2 .5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2z" clip-rule="evenodd"/></svg> **Collections and workbooks**.
1. In the top-right corner, click **Create** → **Create workbook**.
1. In the workbook creation window:
   
   1. Enter a name for the workbook.

      {% note info %}

      The workbook name must be unique within the selected collection.

      {% endnote %}

   1. At the bottom, click <!-- diplodoc:svg ![icon](../_assets/console-icons/paperclip.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="m9.77 10.73.01-.01 3.08-3.08a3.889 3.889 0 1 0-5.5-5.5L4.73 4.77l-.01.01-1.667 1.666a5.303 5.303 0 0 0 7.5 7.5l3.167-3.166a.75.75 0 1 0-1.061-1.06l-3.166 3.166a3.803 3.803 0 1 1-5.379-5.379L5.33 6.291l.011-.01L8.421 3.2a2.39 2.39 0 0 1 3.38 3.378l-1.13 1.13-.012.012-2.995 2.994a.975.975 0 1 1-1.378-1.378L9.28 6.34a.75.75 0 0 0-1.06-1.06L5.225 8.274a2.475 2.475 0 0 0 3.5 3.5z" clip-rule="evenodd"/></svg> **Select file** and select the JSON file with the workbook configuration.
   1. Click **Create**.

   You can see the import progress in the indicator. If you close the indicator window before the import is complete, it will not be interrupted. While the import is in progress, you will see the new workbook in the workbook list labeled as `Importing`, and selecting it will open the import progress window.

Once the import is complete, you may get [warnings](./export-import-notifications.md#import-notifications) with details of the imported workbook and a list of objects requiring attention. To go to the new workbook, click **Open workbook**. You can configure additional settings if you need to, e.g., enter a password for a connection.


If the workbook import fails, you will get an error [message](./export-import-notifications.md#import-notifications). Try to fix the error and re-import the workbook.


## Disabling workbook export {#workbooks-export-disable}

<!-- source: en/_includes/datalens/settings/disable-workbooks-export.md -->
By default, users with the `datalens.admin` role can export workbooks. You can disable this option at the DataLens instance level. After you prohibit export:

* <!-- diplodoc:svg ![icon](../_assets/console-icons/file-arrow-up.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM5.47 8.72a.75.75 0 0 0 1.06 1.06l.72-.72v2.19a.75.75 0 0 0 1.5 0V9.06l.72.72a.75.75 0 0 0 1.06-1.06l-2-2a.75.75 0 0 0-1.06 0z" clip-rule="evenodd"/></svg> **Export** button will disappear from the workbook interface.
* Users will not be able to export workbooks.
* Any JSON export files created before you disable export may be imported to a new workbook.

Only the DataLens instance [admin](../security/roles.md#datalens-admin), i.e., a user with the `datalens.admin` role, can disable export.

To prohibit export of workbooks:

1. In the left-hand panel, select <!-- diplodoc:svg ![sliders](../_assets/console-icons/sliders.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.5 5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m1.405.75a3.001 3.001 0 0 1-5.81 0H1.747a.75.75 0 0 1 0-1.5h1.348a3.001 3.001 0 0 1 5.81 0h5.345a.75.75 0 0 1 0 1.5zm-7.158 4.5h5.345a3.001 3.001 0 0 1 5.811 0h1.347a.75.75 0 1 1 0 1.5h-1.347a3.001 3.001 0 0 1-5.81 0H1.746a.75.75 0 0 1 0-1.5m8.25-.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3" clip-rule="evenodd"/></svg> **Service settings**.
1. Select the **General** tab.
1. Disable **Workbook export** (enabled by default).
<!-- endsource: en/_includes/datalens/settings/disable-workbooks-export.md -->


