Spreadsheet Import¶
The Spreadsheet Import feature is designed to populate the kora database by importing data in tabular format from a spreadsheet file. Supported file formats are XLS, XLSX, ODS, and CSV. Spreadsheet Import is available through the browsable web API interface, which you can access from the user menu in the top navigation bar.
The table columns must be named according to the fields expected by the importer. Please check the specific endpoint documentation for the accepted columns in the Excel table. The importer will always look for data in the first sheet of the provided spreadsheet. Please double-check that the relevant data is in the first sheet of the uploaded file.
At the moment, Excel Import functionality is available only for the following endpoints:
varieties (
POST /api/varieties/excel_import/)entities (
POST /api/entities/excel_import/)protections (
POST /api/protections/excel_import/)descriptions (
POST /api/descriptions/excel_import/)crops (
POST /api/crops/excel_import/)
Access one of these endpoints in the browsable API, click the “Extra Actions” menu, and select “Excel Import”.
Importing Protection Data from Public Databases¶
The Excel import endpoints can be used to import data from external sources such as the EU PVP (European Common Catalogue) or the CPVO website (Plant Breeder’s Rights). These sources commonly provide data in Excel workbook format.
From one of the Excel import views, to import a new file:
Click the Browse button to select the file from your local machine.
Check the Validate Only box to check the file for errors without saving the data to the database.
Validation is performed upon upload, whether or not you choose to save the data. If validation errors are detected, the import is aborted and a row-by-row summary of errors, up to the first 100, is displayed.
Warning
Remember to make a backup of the database before importing, in case you want to roll back.
Recommended Import Workflow¶
When importing protection data (protections endpoint, POST /api/protections/excel_import/) from public databases, you will need to import the related reference records first. Public protection records often include variety denominations (varieties endpoint, POST /api/varieties/excel_import/) and information about the owners of protection rights, such as applicants and maintainers (entities endpoint, POST /api/entities/excel_import/). Because protection records refer to varieties and entities by string matching, those records must be imported before the protections themselves so that the references can be linked correctly. If you split the original data across multiple files for importing, make sure to preserve the strings exactly as they are, since the join depends on exact matching.
The import will attempt to relate varieties, applicants, and maintainers through string matching. If multiple matches exist in your database (e.g. two varieties of the same species with the same name), the importer cannot resolve the ambiguity; it will not associate the protection automatically and will return a validation error. In such cases, you need to remove the row from the file and either import manually through the user interface or use the API directly, where you can specify references using IDs.