Import Samples into Inventory 🧪
Overview
You can bulk import your samples into Inventory by uploading a CSV file. This article explains how to prepare your existing sample data as CSV, and how to perform an import in Inventory.
The import process is as follows:
- firstly, you'll need to export your existing data as CSV, and ensure it fits the CSV format requirements
- then, you'll be able to upload the CSV to Inventory, and specify which columns you want to import and what data type each column should have. This will generate a new sample template with the chosen Inventory field types, and import the samples.
Here's an overview of the process:
1. Export your sample data as CSV
CSV is a common format for table-type data; any spreadsheet software should be able to export data as CSV.
CSV format requirements
- First row has to be a row containing column names. No columns in the header row can be blank
- All rows must have the same number of columns
- All columns must contain non-blank values
- Blank rows are ignored
- Blank values are fine
- Maximum number of rows is 1000
You can download example.csv (if it downloads as example.csv.xls, please rename it to example.csv before opening) and open it in your spreadsheet software to see how the data looks, as well as try importing it to get a feel for the process.
Export as CSV in Google Sheets
In Google Sheets, you can do this by going into File -> Download -> Comma-separated values (.csv)

Export as CSV in Excel
In Excel, you can do this by going into Export -> Change File Type -> CSV (Comma delimited)

2. Import your samples into RSpace Inventory
We will be using example.csv for this example import. If the example file downloads as example.csv.xls, please rename it to example.csv before importing.
- Click on Import -> Samples in the inventory sidebar

- Click on Choose CSV file to upload your CSV

- During import, a sample template will be created and used as the template for your imported samples. Fill in a template name if you wish to replace the default.

- The table displays all the columns that were found in your CSV, and enables you to choose what Inventory field type each will be converted to during import. You can use the checkboxes to select which columns you wish to import.

- To perform an import, you must set one column to convert to the Name of the sample. To change the field type of a column, click on the dropdown and select a type:


- If you select Custom field, the view will expand so you can rename the column, and select from the field types available.

Clicking on the custom field type will give you a dropdown of field types that are available for that column. See the table further down this article for information on the rules used to determine which field types are available for a column.

- You can use the arrow on the right to expand or close the custom field options view.

- Once you are done assigning field types, click on Import.

- You will get a success message if your import has succeeded. Clicking on the dropdown arrow will show you the list of uploaded samples, with their global IDs and a button to view them. If your import is unsuccessful, please view the troubleshooting guide below.


Troubleshooting Guide
- Check that your CSV fits the format requirements.
- Expand the warning message for details on why the import failed:

- Check if any of the fields in your CSV contain commas (eg.
1, 3
); these should be enclosed in quotes (eg."1, 3"
) to be treated as a single value. This is due to CSVs using commas to separate columns, and the presence of commas in fields causing a conflict.
Rules for field type suggestions.
Inventory suggests different field types for CSV columns based on predefined rules. The first matching rule is used as a field suggestion. You can always change the field type of the CSV columns during import.
Column properties | Suggested field type | Types you can change the field into |
All values are empty or whitespace | Plain text | Radio (if < 20 distinct values), Formatted text |
Any value is longer than 100 characters | Formatted text | None |
All values in a column are dates in the ISO-8601 format (e.g. 2021-01-29) | Date | Radio (if < 20 distinct values), Plain text (if < 100 characters), Formatted text |
All values in a column are integers or real numbers | Number | Radio (if < 20 distinct values), Plain text (if < 100 characters), Formatted text |
All values in a column are in the HH:mm time format (e.g. 13:42) | Time | Plain text (if < 100 characters), Formatted text |
All values in a column are URLs (e.g. https://www.researchspace.com/) | URI | Plain text (if < 100 characters), Formatted text |
There are no more than 20 distinct values in the column, and there are repeated values | Radio | Choice, Plain text (if < 100 characters), Formatted text |
Is not suggested, but can be switched to from a Radio field | Choice | Radio, Plain text (if < 100 characters), Formatted text |
Default | Plain text | Radio (if < 20 distinct values), Formatted text |