> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/features/generalites/importer-vos-donnees-excel-csv.md).

# Import your data (Excel, Csv)

{% embed url="<https://www.youtube-nocookie.com/embed/XNcy3eudgZk?si=LadsT5mhFv-hubDT>" %}

## Importing data into Dastra

Dastra lets you very easily import your own data in spreadsheet format directly into the application.

Imports are possible in the following modules:

* import of the record
* import of actors
* import of assets
* import of datasets
* import of fields
* import of security measures
* import of categories of persons concerned
* import of audit responses
* import of audit templates (to come)
* import of risk types
* import of data subject rights requests
* import of data breaches
* import of tasks

In each import, the process is the same.

It is done in 4 steps:

1. [Preparation of the data file](#1.-preparation-of-the-data-file)
2. [Downloading the file](#2.-load-the-file)
3. [Checking data before import](#3.-check-your-data)
4. [Importing the data](#4.-import-the-data)

### 1. Preparation of the data file

Dastra supports only the following data formats:

* **Excel** (.xlsx)
* **Flat files** (.csv, .txt) with separator ; and UTF-8 encoding (the encoding matters in order to keep accents)
* **JSON** (Only for the import of the full record and processing activity templates)

To access the data import menu, click the "import" button under each arrow of the create button.

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

Select Excel if you are asked to:

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

#### Downloading the file template

Then, download a file template by clicking the "Download file template" button.

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

The file template is a **CSV file** that you can easily edit with a spreadsheet tool such as Libre Office, Wordpad, Excel or Google Sheets.

It contains all the necessary columns with sample data.

Example file (for the record):

<figure><img src="/files/zgpbR1GsFudyYnZJeiCE" alt=""><figcaption><p>Line 2 contains example data that must be replaced</p></figcaption></figure>

#### Filling in the file template

Fill the downloaded file with your data.

For each data file, you can display the expected values for the columns:

<figure><img src="/files/CqCAY0HwcDVcF5eWosmm" alt=""><figcaption><p>Expected values for the record import file</p></figcaption></figure>

The imports contain expected values in English. This is perfectly normal. Indeed, this is a technical import into the database.

The English values correspond to the drop-down lists of the selection buttons.

For example, in the record import, the "processing state" field corresponds to the "état du traitement" field in Dastra. This is the field shown in the first step, "General information".

The "State" field corresponds to the status of the processing activity ("brouillon" for "Draft" or "publié" for "Active").

### Datasets: import of associated fields

The export and import of datasets include their associated **data fields**. For each dataset, the exported file lists all the linked fields (label, sensitivity classification, personal data category) and can be re-imported directly to restore these associations, without any additional step.

During an import in **overwrite** mode (updating existing data), the field associations are aligned with the content of the file:

* fields absent from the file are **dissociated** from the dataset;
* fields that do not yet exist in the workspace are **created automatically**.

{% hint style="info" %}
Check the content of your file before an import in overwrite mode: any field not listed will be removed from the corresponding dataset.
{% endhint %}

### 2. Load the file

Once your data file is ready, in some cases you will need to specify an organizational unit. All imported files will be placed in this organizational unit.

{% hint style="info" %}
Only imports of objects that can be attached to organizational units are concerned. For example, the record of processing activities or data breaches. Actors, measures or datasets are not concerned.
{% endhint %}

#### Update data via import

You are offered to tick a box allowing you to update existing data.

This feature lets you update the data in Dastra from the data in the Excel file.

By default, the import creates new objects. If the object already exists (an actor, for example), the import will not create a new object.

It is possible to update an existing object (for example an actor).

In this case, tick the "Update existing data" box and choose the matching field. This field is the key used to identify the fields to update.

<figure><img src="/files/QCHBh8Z9UY4sgVmMI09O" alt=""><figcaption><p>Updating data</p></figcaption></figure>

By clicking the "Overwrite the data of matching rows" button, the corresponding data is replaced by the data from the import.

#### Sending the file

Send the file by clicking in the zone.

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

{% hint style="info" %}
You can also send your files by dragging and dropping them into the file upload zone.
{% endhint %}

### 3. Check your data

The following utility lets you validate and, if needed, map the columns of your Excel file onto the columns expected in the import format.

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

If everything looks correct to you, you can start the data import.

### 4. Import the data

Start the data import by clicking the continue button. The import process will then begin.

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

### 5. That's it!

Well done! You have reached the end of this guide! We recommend that you verify that the data has been correctly imported into the tool.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.dastra.eu/en/features/generalites/importer-vos-donnees-excel-csv.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
