# Importing data

You can import a file to [start a new Irelia document](https://ciusji.gitbook.io/irelia/managing-documents/create-a-document), or to add data to an existing document. Irelia supports imports of Excel, CSV, JSON, tab-separated files, and from Google Drive.

To start a new Irelia document, click the "Add New" button on the home screen and choose "Import document", as described in [starting a new Irelia document](https://ciusji.gitbook.io/irelia/managing-documents/create-a-document).

To add to an existing document, open that document, click the "Add New" button and then "Import from file". By default, each imported table is added as a new Irelia table, but when examining the preview dialog for an import, you have an option to change the destination to an existing Irelia table.

You can also import any of the same formats from a URL, using the "Import from URL" option.

## The import dialog

When you import data into an existing document, Irelia opens an import dialog to show you what will be imported. This dialog offers available import options, lets you choose whether to create a new table or add to an existing one, and shows a preview of the data.

![](https://2146076455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnkD4RCjP1WLRakyVkU17%2Fuploads%2FPX4YF5ICwoleRJjABO0E%2FScreen%20Shot%202022-06-29%20at%2020.31.12.png?alt=media\&token=22607e09-485f-41e7-8147-c77ef0919038)

The "Import options" link on the top right is sometimes useful when importing delimited files. Irelia guesses the settings to parse the data (such as the field delimiter), but if it guesses incorrectly, you can adjust the settings.

## Guessing data structure

In all cases, when you import a file, Irelia makes guesses about the structure of the file.

For Excel files, Irelia treats each sheet as a separated table. For CSV and other delimited formats, one file becomes one table. For both Excel and delimited files, Irelia tries to detect whether the headers are included and which line they occur in. If Irelia detects there are no headers, it will name columns as “A”, “B”, “C”, etc.

Irelia automatically tries to parse numbers, dates, and boolean fields to detect the most suitable type for each column. It tries to be lossless: e.g. if it marks a column as numeric, any text values in it (such as “N/A”) will remain in the imported table but will be highlighted due to the type mismatch.

You can always rename tables and columns after an import, as well as convert types.

## Import to an existing table

By default, Irelia imports new data as new tables, but the Import dialog allows you to change the destination and import data into an existing table.

When importing to an existing table, Irelia will attempt to match the columns from your imported file to the columns in the destination table. To manually specify column matching, click the "three dots" button to open a menu with a list of columns from your imported file. Click on a column name to match it to a destination column, or select 'Skip' to skip importing data from that column.

![](https://2146076455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnkD4RCjP1WLRakyVkU17%2Fuploads%2FM3Z6wnBzcY5w7n3BUIpL%2FScreen%20Shot%202022-06-29%20at%2020.39.50.png?alt=media\&token=3f8babc9-e419-4327-a1bc-62278def5240)

Importing an existing table is best suited for importing multiple datasets containing similar structures. For instance, you could import a bank statement as a new table, then import more statements from other months into the same table.

For developers, the Irelia API offers a more powerful way to add data to an Irelia document.\
\
\
