# 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FYaqcnyS4kYqe2pEoExY4%2Fimage.png?alt=media&#x26;token=70403d9b-2cc3-40eb-86c7-a459ed8e284e" 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FWdpUaEyRWxqTcyjxEAyx%2Fimage.png?alt=media&#x26;token=021e291e-b4a9-4a15-a874-6186d0b48889" alt=""><figcaption><p>Insert rows</p></figcaption></figure>

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

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FMudX1fU8ZWp9TWrjgweG%2Fimage.png?alt=media&#x26;token=f46aca43-fbb8-4dca-933c-996a28aa69c4" 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2Fbuaev6qdTA0jPYDoIKlM%2Fimage.png?alt=media&#x26;token=ff8c108b-42c4-4780-91b5-40930d1aaf71" 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2Fh6hGIcqlW0owCUMAOxxB%2Fimage.png?alt=media&#x26;token=9d4069bd-8d19-4e23-a302-497f9e397c1e" alt=""><figcaption><p>Click to upload</p></figcaption></figure>

4. Select the required file from the systems folder.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FcmskWzrzHTYu46o8wr5G%2Fimage.png?alt=media&#x26;token=0d8f0e7d-8dfd-47e1-a468-35acdf95f199" alt=""><figcaption><p>Select to upload</p></figcaption></figure>

5. Click on **Upload.**

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FSSD026HHQHQNFui1LGUP%2Fimage.png?alt=media&#x26;token=de896c27-8937-4902-a25f-21da80d6cf4c" 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FosErH1WYEhzdYWxaY3Ya%2Fimage.png?alt=media&#x26;token=ea449948-ba1e-4333-a586-849e74c39cea" 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="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FXy8EVaZErvhlXqnF6UDA%2Fimage.png?alt=media&#x26;token=7bc3dcb8-150b-4b55-b24a-cfe5a9d2ab5c" alt=""><figcaption><p>Rows updated and imported</p></figcaption></figure>

The table has been updated with changes and new rows.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FQrXXGw5t55MJlFec5DiK%2Fimage.png?alt=media&#x26;token=7ccaf60b-e006-4274-8842-f1f2bd4e3bab" 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 %}
