Symptom
You open a workbook and you receive the error message "An item with the same key has already been added" and you are unable to proceed further.
You can see also: "AFO Excel Calling CofComObject AddInInitialized() returned False! Means ThisAddIn_StartUp(..) has not been called or finished successfully!"
Environment
Analysis for Office
Reproducing the Issue
Open a workbook and error message "An item with the same key has already been added" pops up and you are unable to proceed further.
Also appears the message "AFO Excel Calling CofComObject AddInInitialized() returned False! Means ThisAddIn_StartUp(..) has not been called or finished successfully!"
Cause
One root cause of the error message can be a corrupted custom profile.
To be able to confirm that information you can record a LOG file on "Support" mode and it will be recorded the following statement:
Setting deviating from default value: Name: AppBuilderDefaultProfilePath value: C:\Users\<USER>\AppData\Roaming\SAP\Cof\User Interface\Profile_name.xml#
2018-11-06 15:37:36,491|ERROR|Trace.Cof|Com.Sap.Cof.Core.ServiceAdapter.HandleExceptionService.ProcessUnhandledException|VSTA_Main|Error details: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
Resolution
To fix the issue you will need to recreate the profile.
For more information about profiles access this link.
See Also
Keywords
item, same key, Profile, ProcessUnhandledException, corrupted, custom profile , KBA , BI-RA-AO-XLA , Excel Addin , Problem