What excel versions supported?

Apr 24, 2013 at 2:36 PM
Hi Kendal,
Nice script! Got the CliXML file no problem. However, I'm running Excel 2013 on Server 2012, is that the reason I get this error? Debug content at bottom:


PS C:\my doc folder\WindowsPowerShell> .\Convert-WindowsInventoryClixmlToExcel.ps1 -FromPath "C:\my doc folder\Windows Inventory - 2013-04-24-10-07.xml" -LoggingPreference debug
Property 'DisplayAlerts' cannot be found on this object; make sure it exists and is settable.
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:2377 char:4
  • $Worksheet.Application.DisplayAlerts = $false
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyNotFound
Method invocation failed because [System.__ComObject] doesn't contain a method named 'SaveAs'.
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:2378 char:4
  • $Workbook.SaveAs($Path)
  • ~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound
Property 'Saved' cannot be found on this object; make sure it exists and is settable.
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:2379 char:4
  • $Workbook.Saved = $true
  • ~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException
Exception setting "ScreenUpdating": "Exception from HRESULT: 0x800AC472"
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:2382 char:4
  • $Excel.ScreenUpdating = $true
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
    • FullyQualifiedErrorId : ExceptionWhenSetting
Exception calling "Quit" with "0" argument(s): "Exception from HRESULT: 0x800AC472"
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:2387 char:4
  • $Excel.Quit()
  • ~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : COMException
Method invocation failed because [System.__ComObject] doesn't contain a method named 'Item'.
At C:\my doc folder\WindowsPowerShell\Modules\WindowsInventory\WindowsInventory.psm1:884 char:4
  • $Worksheet = $Excel.Worksheets.Item($WorksheetNumber)
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (Item:String) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : MethodNotFound
Log file content (in debug mode):
2013-04-24 10:28:25.8548 ? Starting Script: c:\my doc folder\WindowsPowerShell\Convert-WindowsInventoryClixmlToExcel.ps1
2013-04-24 10:28:25.9773 ? Loading inventory from 'c:\my doc folder\Windows Inventory - 2013-04-24-10-07.xml'
2013-04-24 10:28:27.7348 * Start Function: Export-WindowsInventoryToExcel
2013-04-24 10:28:27.7448 ? Beginning output to Excel
2013-04-24 10:28:27.7573 ? Beginning output to Excel
2013-04-24 10:28:29.7755 $ Writing Worksheet #1: Overview
Coordinator
Apr 24, 2013 at 2:49 PM
I've used Excel 2013 running on Windows 8 and haven't run into this problem. Do you have the .NET Programmability Support feature for Excel installed?

The image below shows where this is for Office 2007 but it's more or less the same for 2013 as well:
Image


Kendal
Apr 24, 2013 at 3:07 PM
It looks the same in 2013 and is installed.
excel isn't activated, get activation error 0xc004c032.
Disregard this issue till I investigate this lovely Excel error message.
Apr 24, 2013 at 5:00 PM
Activating Excel 2013 didn't solve.
Turns out installing Excel 2010 solves the problem. Ran for a much shorter time against Excel 2013, and it was erroring out early and attempting to save the workbook object.
Coordinator
Apr 24, 2013 at 5:06 PM
That's really odd - I wonder if there's some issue specific to your installation that was fixed by installing Excel 2010. I've got a clean install of Office 2013 on my dev machine and did not run into the problem you reported.

I guess for now I'll consider it resolved until I hear that other people are experiencing similar issues with Excel 2013.

Kendal