【发布时间】:2014-06-16 20:41:16
【问题描述】:
我需要从 Powershell 读取 Excel 文件。
我正在使用这个对象:
$objExcel=New-Object -ComObject Excel.Application
在安装了 Office 的机器上运行良好,但如果未安装 Office,我会收到以下错误:
Retrieving the COM class factory for component with CLSID {} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
是否有一些运行时环境供 Office 使用?
【问题讨论】:
标签: excel powershell ms-office powershell-2.0