# Import rows

It can be a tedious process to manually insert or update several rows. In such cases, you can import the data directly from an external file.&#x20;

EDITable allows you to insert and update multiple rows at once by importing CSV or Excel files. The rows are updated based on matching primary keys from the file.

1. To import new rows, click **Import** on the toolbar that opens the 'Import from file' pop-up.

<figure><img src="/files/wqfNLWLflrn7gGjppU50" alt=""><figcaption><p>Import rows</p></figcaption></figure>

2. There are three options to choose from: **'Insert'** to just insert new rows; '**Update'** to update existing rows; and **'Insert and Update'** when you need to insert new ones and modify the existing ones.

**a) Insert:** Select the 'Insert' option to only insert the new rows from the uploaded file.

<figure><img src="/files/vFcnKAfbRMSSCYbHuswY" alt=""><figcaption><p>Insert rows</p></figcaption></figure>

**b) Update:** Select the 'Update' option to update only the changes.

<figure><img src="/files/ZVV7KfApk0ZMc1P73CQQ" alt=""><figcaption><p>Update rows</p></figcaption></figure>

**c)** **Insert and Update:** Use this option to insert new rows while also updating any changes to the existing records.

<figure><img src="/files/ZVXLTCYQdRRlPBEsHNVj" alt=""><figcaption><p>Insert and Update rows</p></figcaption></figure>

3. After choosing from one of the options above based on your requirement, select **Click to Upload** to upload an Excel or a CSV file.

<figure><img src="/files/1ZFXX3ldFX9Nor26vLf8" alt=""><figcaption><p>Click to upload</p></figcaption></figure>

4. Select the required file from the systems folder.

<figure><img src="/files/MRwi1MQq5eGBW9yV3Bgu" alt=""><figcaption><p>Select to upload</p></figcaption></figure>

5. Click on **Upload.**

<figure><img src="/files/LjCPev1WjMtt7avhcTHU" alt=""><figcaption><p>Click 'Upload'</p></figcaption></figure>

6. We have used an example that includes both inserting and updating rows. In the preview, you can see that the changes are denoted in blue, while new rows are indicated in green. Click **Import.**

<figure><img src="/files/YQV1j8YR93sUnNkTqXU9" alt=""><figcaption><p>Preview of the imported file</p></figcaption></figure>

7. You can see the success toast message. In case of any errors, you can view the log by clicking on **View log.**

<figure><img src="/files/zuUlDLGsAQee6OHkHokt" alt=""><figcaption><p>Rows updated and imported</p></figcaption></figure>

The table has been updated with changes and new rows.

<figure><img src="/files/SxiKqGbzuBMGc3UQaHNo" alt=""><figcaption><p>Updated table</p></figcaption></figure>

{% hint style="info" %}

1. Ensure the XLSX/CSV file that you import contains the necessary primary key fields and other mandatory fields configured in the 'Manage Columns' section.
2. The maximum number of new rows that can be inserted at once is 20000.
   {% endhint %}


---

# 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.editable.io/working-with-editable/table-operations-insert-update-delete/import-rows.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.
