title: COMException when creating COM object for Excel Automation in C#
body: <p>I've got this error when I create a COM object in order to use Excel automation. Any one knows why I am getting this error?</p>
  
  <p>System.Runtime.InteropServices.COMException(errorCode = -2146959355)
  Message: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005.</p>
  
  <p>The call stack is following:</p>
  
  <p>System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
    at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(Type objectType)
    at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(Type serverType)
    at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandle&amp; ctor, Boolean&amp; bNeedSecurityCheck)
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
    at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at Geotab.ComObject..ctor(Type type)</p>
  
  <p>This is my code:
  Type excelAppType = Type.GetTypeFromProgID("Excel.Application");
  comExcelObject = new ComObject(excelAppType);</p>