title: Exception automating Excel 2007 with Powershell when calling Workbooks.Add()
body: <p>The following code throws an exception in Powershell V1 (Excel 2007):</p>
  
  <pre><code>$E = New-Object -COM "Excel.Application"
  $E.Visible = $True
  $wb = $E.Workbooks.Add() #&lt;&lt;&lt;Exception here
  </code></pre>
  
  <p>The error says that the format might be old or that the type library is not valid (translated from Spanish). A similar script for Word works just fine.</p>