Skip to main content

Using CSV files to bulk rename devices

This guide provides detailed instructions on how to create, edit, and use comma-separated values (CSV) files compatible with the emnify Portal. CSV files are used for several bulk actions, but this guide focuses on renaming devices in bulk. It also addresses common issues and their resolutions.

What is a CSV file?

Comma-separated values (CSV) is a file format used to store tabular data, such as a spreadsheet or database. Each row in a CSV file corresponds to a record, and columns are separated by commas and semicolons.

Types of CSV files accepted by emnify

The emnify Portal accepts CSV files with standard comma (,) or semicolon (;) separation. Ensure the file:

  • Uses UTF-8 encoding.
  • Avoids extra formatting (for example, merged cells or text styling).

Get a CSV file with device ICCIDs

To rename devices in bulk you need a CSV file with the integrated circuit card identifiers (ICCIDs) and new device names. You can retrieve a CSV file with device ICCIDs from Reports in the emnify Portal.

  1. Navigate to Reports.
  2. Select the Device List report.
  3. In the upper right corner, click More Options.
  4. Click Download Data to export and save the CSV file to your local device.

Open downloaded CSV files correctly

To avoid issues, don't convert the CSV file or change its formatting. Some tools automatically reformat data, particularly ICCIDs, leading to errors.

Google Sheets

Google Sheets is a popular tool for working with CSV files and works well with files downloaded from the emnify Portal. To open a CSV file in Google Sheets:

  1. Open Google Sheets and select File > Import > Upload.
  2. Upload your CSV file.
  3. Before editing, ensure that the data format for the ICCID column follows the necessary format.

Microsoft Excel

Microsoft Excel is a widely used spreadsheet application that can cause issues with CSV files depending on your operating system.

macOS

Excel on macOS tends to open CSV files with all data in a single column. Be sure to choose the option Do not convert values when opening the file to prevent ICCIDs from being altered.

Windows 10

Be cautious because Excel on Windows tends to convert ICCIDs into a scientific format (for example, 8.91234E+18) with no way to convert it back. To avoid this, you can try the following:

  1. Open Excel and select File > Open.
  2. Import the CSV as a text file and set the ICCID column type to Text.

Apple Numbers

Apple Numbers is a spreadsheet application for macOS. It's compatible with CSV files from the emnify Portal.

note

When you edit and save CSV files downloaded from the emnify Portal in Numbers, it changes the delimiter from a comma (,) to a semicolon (;).

LibreOffice Calc

LibreOffice Calc is a free and open-source spreadsheet application. It's an alternative to Microsoft Excel and commonly used on Linux systems. Overall, LibreOffice Calc is compatible with CSV files from the emnify Portal as long as you change the ICCID field type from Standard to Text during the import process.

Plain text editors

You can use text editors like Notepad (Windows), TextEdit (macOS), or Vim/gedit (Linux) to view the raw CSV data. Avoid editing directly unless you're confident in maintaining the correct format.

Edit device name in bulk using a CSV file

For bulk device renaming, you need two columns in your CSV file:

  1. ICCID: The unique identifier for each device (maximum length: 22 characters)
  2. Device Name: The new name you want to assign to each device (maximum length: 45 characters)

Other format requirements include:

  • Maximum file size: 400 KB
  • Maximum rows: 1000
  • Naming conventions: Device names can't contain commas , or semicolons ; as those are used as delimiters in the CSV file.

Editing CSV files in different tools

tip

You can download an example CSV file from the emnify Portal to see the correct format. Follow the upload CSV steps in the Rename devices in bulk guide.

Microsoft Excel or Google Sheets

  1. Open the CSV file using the tips from the preceding section.
  2. Remove unnecessary columns, keeping only ICCID and Device Name.
  3. Enter the desired names in the Device Name column.
  4. Save the file as a CSV (.csv), ensuring the delimiter remains a comma (,).

Apple Numbers

  1. Open the CSV file as usual.
  2. Remove unnecessary columns, keeping only ICCID and Device Name.
  3. Enter the desired names in the Device Name column.
  4. Save and export the file as a CSV (.csv) with the following settings:
    • Include table names: Leave unselected
    • Advanced Options > Text Encoding: Unicode (UTF-8)
note

The exported CSV file has semicolons (;) as delimiters instead of commas.

LibreOffice Calc

  1. Open the file and ensure the ICCID column type is set to Text.
  2. Edit the Device Name column.
  3. Save the file as a CSV (.csv), confirming UTF-8 encoding and comma delimiters.

Plain text editors

Ensure each line follows the pattern: ICCID,Device Name. For example:

89123456789012345678,Device A
89123456789012345679,Device B

Save CSV files correctly

After editing the CSV file, save it correctly to avoid issues during the upload process. Ensure the file:

  • Uses commas (,) or semicolons (;) as delimiters.
  • Is saved in UTF-8 encoding.
  • Doesn't contain extra formatting or unnecessary metadata.

Saving in common tools

  • Microsoft Excel: Select File > Save As and select CSV (Comma delimited) (*.csv).
  • Google Sheets: Select File > Download > Comma-separated values (.csv).
  • Apple Numbers: Select File > Export To > CSV... and confirm the settings > Next... > Name your file and select Export.
  • LibreOffice Calc: Select File > Save As, then select CSV and confirm UTF-8 encoding and comma delimiters.

Upload the CSV file to the emnify Portal

See the Rename devices in bulk guide for detailed steps on uploading the CSV file to the emnify Portal.