Error uploading Excel file to AGOL: 'Item with the same key has already been added'

2611
4
Jump to solution
02-27-2020 10:52 AM
Trippetoe
Occasional Contributor III

I am trying to upload an Excel file to AGOL, but i keep getting an error with the message: "Item with the same key has already been added'.  I am using the 'Add Item -> From your Computer' tool on the Content tab.  As far as i can tell, the Excel file i want to upload has never been added to my AGOL org.

Using Chrome's Dev tool,  i see the following network communications, which seem to indicate that the file upload works but the itemId already exists. Is that possible?

sharing/rest/search
{"query":"title:\"AsthmaRelatedHospitalizationRates\" AND type:\"Microsoft Excel\" AND owner:\"..........\" AND ownerfolder:\".............\"","total":0,"start":1,"num":1,"nextStart":-1,"results":[]}

sharing/rest/content/users/..../..../addItem
{"success":true,"id":"46b220edf0854c858e797c7632cb3176","folder":"2e2438a634d44787802372535a19727a"}

sharing/rest/content/users/..../..../status
{"status":"completed","statusMessage":"completed","itemId":"46b220edf0854c858e797c7632cb3176"}

sharing/rest/content/features/analyze
{"error":{"code":400,"message":"An item with the same key has already been added.","requestId":""}}

Any thoughts on how i can get the file uploaded? 

Thank you.

1 Solution

Accepted Solutions
Trippetoe
Occasional Contributor III

I contacted Esri tech support about this issues, and the fine person there helped me figure out the problem. One of the sheets in the Excel file had some duplicate 'column header' values. Once we eliminated the duplicate columns, i was able to upload the file without a problem.

View solution in original post

4 Replies
Trippetoe
Occasional Contributor III

I contacted Esri tech support about this issues, and the fine person there helped me figure out the problem. One of the sheets in the Excel file had some duplicate 'column header' values. Once we eliminated the duplicate columns, i was able to upload the file without a problem.

JenniferBorlick
Occasional Contributor III

Thanks. I just had this happen as well. Perhaps a more intuitive error message would be helpful. Like "Error: Column names cannot be duplicated."

BrittanyBurson
Occasional Contributor III

Thank you Tom for sharing your resolution. I just had this error and the same fix worked for me.

0 Kudos
CarynNezatUSDA
New Contributor II

I am having the same error. I have multiple tabs in my excel file and there are no duplicate headers in the file, however the GlobalId is a duplicate header on the different sheets. Could this be the problem? I had some data in the FL but want to update and append. I even created a completely new FL and still have the same problem. ANY help or ideas would be appreciated 

0 Kudos