title: Interop Excel method LinEst failing with DISP_E_TYPEMISMATCH
body: <p>I am facing a problem while making Excel's LinEST function.</p>
  
  <p>My program goes like</p>
  
  <pre><code>MyExcel.Application xl = new MyExcel.Application();
  MyExcel.WorksheetFunction wsf = xl.WorksheetFunction;
  List&lt;int&gt; x = new List&lt;int&gt; { 1, 2, 3, 4 };
  List&lt;int&gt; y = new List&lt;int&gt; { 11, 12, 45, 42 };
  object o = wsf.LinEst(x, y, true, true);
  </code></pre>
  
  <p>And the namespace is <code>using MyExcel = Microsoft.Office.Interop.Excel;</code></p>
  
  <p>The program is compiling smoothly but at runtime it is throwing an error</p>
  
  <pre><code>{System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
  </code></pre>
  
  <p>Actually this is the first time I am using Excel function .. so I am unable to proceed further. If any one has run thru this kind of situation and has solved, please help me.</p>
  
  <p>I am using C# 3.0.</p>