Attempting to upload a CSV file and selecting the 'Add <file name> and create a hosted feature layer or table' option in ArcGIS Online fails and returns the following error message:
Duplicate field names
Duplicate field names are not allowed.
Two or more fields in the CSV file share the same name or are duplicates. Field names of hosted feature layers must be unique and not identical to one another.
Solution or Workaround
- Open the CSV file in Microsoft Excel.
- Navigate to the relative field and apply either of the following options based on the circumstances.
- For fields with the same name, double-click one of the fields and rename the field. In the example below, the duplicate field 'DATE' is renamed to 'NEW_DATE'.
- For duplicate fields with duplicated values, right-click one of the field headers and select Delete.
For complex tabulated data, refer to Microsoft: Find and remove duplicates to locate and delete duplicates.
- Save the CSV file.
- Upload the CSV file to ArcGIS Online. Refer to ArcGIS Online: Publish a CSV file for instructions.