Problem: Unable to upload an Excel file in ArcGIS Online
When attempting to upload a Microsoft Excel (.xlsx) file in ArcGIS Online, the action fails and returns the following error message:
Error: An item with the same key has already been added.
The following are known causes for the issue:
- Two or more fields in the Excel file have the same name.
- The field name in the Excel file contains special characters or spaces.
Solution or Workaround
Depending on the cause, use one of the options below to resolve the issue.
Rename or remove the duplicate field
- In Microsoft Excel, browse to the fields with the same name, and rename one of them. In the example below, the duplicate field (SITE_ID) is renamed to SITE_ID_01.
- Remove the column if the field of the same name is a duplicate.
Ensure the field names do not include special characters or spaces
- Delete special characters such as slash (/) from the field names.
- Replace spaces in the field names with underscores.
Convert the Excel file to a CSV file
- Open the Excel file.
- Click File > Save As.
- In the drop-down menu, select the .csv file format, and click Save.
- FAQ: What characters should not be used in ArcGIS for field names and table names?
- ArcGIS Blog: Add spreadsheet data to ArcGIS Online
- ArcGIS Blog: Excel Tips for ArcGIS Online
- ArcGIS Online: CSV, TXT, and GPX files
Last Published: 9/1/2020
Article ID: 000023836