Creating/Updating Records in Bulk: Importing a File

Article Number:040724

You can create or update records in bulk by importing an Excel or a CSV file into an existing app.
There are some limitations on importing a file; for example, data of a file cannot be imported into certain types of fields. Confirm the notes described on this page before importing a file.

Points to Note Before Importing a File

  • To import a file, a user must be granted the "Import from file" permission, which can be configured in the Permissions for App setting. By default, the "Import from file" permission is granted only to the app creator.
    If a user wants to import data of a file into the "Created by," "Created datetime," "Updated by," and/or "Updated datetime" fields, s/he also needs the "Manage app" permission.
    As necessary, go to the Permissions for App setting and grant the "Import from file" and "Manage app" permissions to the user who will carry out the operation.

  • It is recommended that you create a backup of existing records by exporting them to a file before importing a file. For details on how to export them to a file, refer to Exporting Data to a File.

  • While data is being imported from a file, you may not be able to update or create records from the Kintone screen or using API.

Fields into Which File Data Cannot Be Imported

The data of a file cannot be imported into the following types of fields:

  • Label
  • Text (If Calculate automatically is enabled)
  • Calculated
  • Attachment
  • Related records
  • Lookup (If "Prohibit duplicate values" is disabled for the field specified as the Key Field)
  • Created by, Created datetime, Updated by, and Updated datetime (of existing records)

The data of a file can be imported into the "Created by," "Created datetime," "Updated by," and/or "Updated datetime" fields only when a new record is created.

For details on the data that can be imported into or exported from an app, refer to Import/Export of App Data.

Key Points of the Import from File Operation

After selecting a file to be imported on the "Import from File" screen, specify which column in the file corresponds to which field in the app ("Column in File"). If you want to update records in bulk, also specify the field to be used as "Key to Bulk Update."
This section explains key points for configuring these two settings. Image

(a) Specifying "Column in File"

For the "Column in File" setting, specify which column in the file is imported into the field in the app. Image

  • When creating new records by importing a file, make sure you specify a column for each of the following fields:

    • Fields into which you want to import data of the file
    • Fields that must be filled in (Fields marked with an asterisk '*')

    If you do not specify any column for a field, the field will be left empty or the default value will be input (if a default value is set for the field). A default value is always set for the "Radio button" field. If you want to update its value and do not want the default value to be input, make sure to specify a column for the field.

  • When updating existing records by importing a file, specify a column only for the fields whose value you want to update. If you do not specify any column for a field, its value will not be updated.

  • If you want to update a table by importing a file, specify a column for all the fields in the table which are displayed under "Field in App."

(b) Specifying "Key to Bulk Update"

When updating the values already registered in records by importing a file, specify the field to be used as "Key to Bulk Update."

  • When a value of the field specified as "Key to Bulk Update" matches the value of the corresponding column in the file, the data of the record is replaced with the data in the row of that particular cell in the file.
  • When a value in the corresponding column in the file does not match any of the value of the field specified as "Key to Bulk Update," the data in the row of that particular cell in the file is registered as a new record.
    Image

The following types of fields can be specified as "Key to Bulk Update":

  • Record number
  • Text
  • Number
  • Date
  • Date and time
  • Link

Procedure to Import a File

  1. Click the Options button Options button on the upper right side of the screen and click Import from File. Image

  2. Click Browse and select an Excel or a CSV file to import. Image

  3. Select either of the radio buttons displayed under Select Data Scope.
    If your file has column names in the first row, select First row is header. Image Depending on the column names in or the content of your file, First row is header may be automatically selected.

  4. Check that the content of the file you are importing is correctly displayed in the Preview.
    Image The Character Encoding and Delimiter drop-down lists are displayed only when you are importing a CSV file.

    • If characters in the file are garbled, select a different option from the Character Encoding drop-down list.
    • If the file is not separated into columns correctly, select a different option from the Delimiter drop-down list.
  5. Specify a column in the file for each field in the app.
    Image When the file has column names in the first row, the column whose name matches the app's field name is automatically specified as "Column in File" for the field.

    • When creating new records by importing a file
      Make sure you specify a column for each of the following fields:

      • Fields into which you want to import data of the file
      • Fields that must be filled in (Fields marked with an asterisk '*')

      If you do not specify any column for a field, the field will be left empty or the default value will be input (if a default value is set for the field).

    • When updating existing records by importing a file
      Specify a column only for the fields whose values you want to update. If you do not specify any column for a field, its value will not be updated.

  6. When updating existing records, select the Key to Bulk Update check box.
    Image

    • When a value of the field specified as "Key to Bulk Update" matches the value of the corresponding column in the file, the data of the record is replaced with the data in the row of that particular cell in the file.
    • When a value in the corresponding column in the file does not match any of the value of the field specified as "Key to Bulk Update," the data in the row of that particular cell in the file is registered as a new record.
  7. If you want to import the file's data into the "Created by," "Created datetime," "Updated by," and "Updated datetime" fields of the records to be newly created, specify a column in the file for each field displayed in the "Record Creation/Update Information" section. Image

    • When creating new records by importing a file: if you specify "(None)" as "Column in File" for these fields, the user who carried out the Import from File operation is registered in the "Created by" and "Updated by" fields of newly created records, and the date and time of the operation is registered in the "Created datetime" and "Updated datetime" fields of the records.
    • When updating existing records by importing a file: it is not possible to import the file's data into these fields. The user who carried out the Import from File operation and the date and time of the operation are registered in the "Updated by" and "Updated datetime" fields respectively.
  8. Click Import on the upper left side of the screen. Image

After completing the steps above, you are automatically navigated to the "View" screen.
While your file is being imported or when the Import from File operation fails, a message is displayed at the top of the "View" screen. Clicking the link in the message displays the "Imported Files" screen. On the "Imported Files" screen, you can check the progress or the result of the Import from File operation you have performed.
The screen displayed while your file is being imported

If your Import from File operation failed, refer to What to Do If You Failed to Bulk Add/Update Records for the solutions.