Importing Data¶
Import records into a table from a CSV or Excel file. Use it to load reference data such as a list of districts, to bring in data collected elsewhere, or to update many records at once.
Prepare the file¶
Make a file with one row per record and one column per field. The first row holds the column names.
- Match the column names to the field names or labels where you can. 3D matches them for you, and you correct the rest.
- For a Relation field, the column holds a value that identifies the related record, such as its name. You choose which field of the related table to match it against.
- For a Select field, the column holds the option value or its label.
- For a Multi-Select field, separate the values with a comma.
- For a Date field, use a full date such as 2026-03-31.
- For a Phone number field, 3D keeps the digits only.
- A number with a leading zero, such as 0712345678, keeps the zero.
- To set the date each record was created, add a column with the date, such as 2026-03-31. Without it, each new record gets the date of the import.
Tip
The quickest way to get the right columns is to export the table first. See Exporting data. Delete the rows, fill in your data, and import the file.
Import from CSV or Excel¶
- Open the table's records page.
- Click Import Data in the top right corner and choose CSV or Excel.
3. Choose the file. The import dialogue opens with the mapping.
Mapping fields¶
The dialogue lists the table's fields under System Field. Next to each one, under Upload Field, choose the column of your file that holds its values. 3D fills in the columns with matching names. Preview Data shows the first values from the chosen column, so you can check the match.
Tick Ignore next to a field to leave it out of the import. Select all and Deselect all above the column tick or clear every row. Import stays off until at least one row is not ignored and has a column chosen.
The list has no row for Matrix, ID or calculated fields. 3D fills those itself. The last row, Created At, sets the creation date of each new record. A record that the import updates keeps its creation date.
For a Relation field, also choose the match field. This is the field of the related table that your column's values are compared with. For a Farmers column that holds cooperative names, the match field is the Cooperatives table's name field.
Updating records that exist¶
The dialogue asks Match to override pre-existing records?
- No: every row becomes a new record.
- Yes: 3D looks for a record that matches each row, and updates it. A row with no match becomes a new record. Choose the column of your file and the field of the table to match on. The usual pair is the record's system id, which an export gives you in its last column.
An update changes only the fields that the row has a value for. An ignored field keeps its value.
With Yes, the dialogue also asks what to do with Blank cells in matched columns:
- Keep the current value (the default): a blank cell leaves the record's value as it is.
- Clear the value: a blank cell removes the record's value in that field.
With data scoping on, the import can update only the records inside your scope. A row that matches a record outside your scope, or that holds a value outside your scope, is not imported. It goes to the file of rows that were not imported.
Validation¶
Tick Apply Validation to check every row against the fields' rules, such as required, minimum, maximum and the sub-type of a Text field. A row that fails is not imported.
3D always makes two checks, with or without validation. A row fails if a value does not fit the type of its field, such as text in a number field, or if a Select value is not one of the field's options. A Select cell can hold the option's value or its label, in any case.
Run the import¶
Click Import. 3D reads the file and creates or updates the records. A calculated field is worked out for each imported record.
When every row is accepted, 3D confirms that all records are imported.
Handling import errors¶
When some rows fail a check, 3D reports how many, and offers a file of the rows that were not imported, with the reason for each. Download it, correct the rows, and import that file again. The rows that passed are already in the table.
Import from Kobo¶
Note
Kobo import is not available at the moment. 3D shows the message "Kobo import is not available at the moment." when you try it. This applies to records and to structures.
Choose Import Data, then Kobo, to bring records from a KoboToolbox form into the table. Enter the Kobo Server URL and the Form ID, then map the fields as above and import.
Importing a structure¶
To create the fields of a table, rather than its records, open the table's Structure page and click Import Structure or Import Kobo.
| Source | What 3D does |
|---|---|
| CSV or Excel | Reads the column headings of the first row and creates a field for each one, with the heading as its label. Set the types afterwards on the Structure page. |
| Kobo | Enter the Kobo Server URL and the Form ID. 3D reads the form's questions and creates a field for each one. |
3D does not import an XLSForm as a form. Import Structure adds to the fields that exist. Check the result before you add records.