title: Powershell 4.0 and Excel 2013 | Bug | Work-a-round
body: <p>I am having troubles working with the new Powershell (4.0) and Excel 2013.
  I know this is (or was) a common bug and I tried to work around it. But I failed. I can open an Excel-file and work on it without any problems. But it seems, that I can't close or save the workbook.</p>
  
  <p>Additional information: I am in Europe - in Austria.</p>
  
  <p>Additional information2: This Script works very well with Powershell 3.0 and Excel 2010.</p>
  
  <p>Known bug, which shouldn't be in Excel 2013: <a href="http://support.microsoft.com/kb/320369/en-us" rel="nofollow">http://support.microsoft.com/kb/320369/en-us</a></p>
  
  <p>Why did I state this bug? Because my Script wouldn't even open the excel file in 2013 without the CurrentCulture part.</p>
  
  <p>Code:</p>
  
  <pre><code>$Path     = "C:\Script\test.xls"
  #Excelvar:
      $Excel               = New-Object -ComObject Excel.Application
      $Excel.Visible       = $true
      $Excel.DisplayAlerts = $false
      $newci = [System.Globalization.CultureInfo]"en-US"
      [system.threading.Thread]::CurrentThread.CurrentCulture = $newci
      [System.Threading.Thread]::CurrentThread.CurrentUICulture = $newci
          #Sheets:
          $Sheet1         = "1"
          $Sheet2         = "2"
          $Sheet3         = "3"
          $Sheet4         = "4"
          $Workbook       = $Excel.Workbooks.open($Path)
  
          #Sheets:
          $Sheet1 = $Workbook.Worksheets.Item($Sheet1)
          $Sheet2 = $Workbook.Worksheets.Item($Sheet2)
          $Sheet3 = $Workbook.Worksheets.Item($Sheet3)
          $Sheet4 = $Workbook.Worksheets.Item($Sheet4)
          #some reading and writing in the sheets
          ##############################
       #Saving and closing:
       $Workbook.SaveAs($Path)
       $Workbook.Close()
       $Excel.Quit()
       [System.Runtime.Interopservices.Marshal]::ReleaseComObject($Excel) &gt; $null
  </code></pre>
  
  <p>Errorcodes:</p>
  
  <pre><code>Method invocation failed because [System.__ComObject] does not contain a method named 'SaveAs'.
  At C:\Script\SCRIPT.ps1:620 char:5
  +     $Workbook.SaveAs($Path)
  +     ~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
  + FullyQualifiedErrorId : MethodNotFound
  
  Method invocation failed because [System.__ComObject] does not contain a method named 'Close'.
  At C:\Script\SCRIPT.ps1:621 char:5
  +     $Workbook.Close()
  +     ~~~~~~~~~~~~~~~~~
  + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
  + FullyQualifiedErrorId : MethodNotFound
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>If any further information is needed to help me solving this problem. Be free to ask. I would really appreciate any help.</p>