我已經寫了下面的代碼轉換XLSX文件,以CSV格式:得到錯誤800a03ec在打開Excel文件
If WScript.Arguments.Count < 2 Then
WScript.Echo "Error! Please specify the source path and the destination. Usage: XlsToCsv SourcePath.xls Destination.csv"
Wscript.Quit
End If
Dim oExcel
Set oExcel = CreateObject("Excel.Application")
Dim oBook
Set oBook = oExcel.Workbooks.Open(Wscript.Arguments.Item(0))
oBook.SaveAs WScript.Arguments.Item(1), 6
oBook.Close False
oExcel.Quit
這是工作正常,當我給服務器路徑XLSX文件。但是,當我給本地計算機路徑,它給我以下錯誤:
File could not be found. Check the spelling of the file name, and verify that file location is correct. If you are trying to open the file from list of most recently used files, make sure that file has not been renamed, moved or deleted
code: 800A03EC
Source: Microsoft Office Excel
請在提交問題或答案之前查看預覽。 – 2013-05-06 07:46:41
你稱之爲「服務器路徑」和「本地機器路徑」是什麼?請向我們展示您的命令行。 – 2013-05-06 11:55:04
我與MS Office Professional Plus 2010的問題完全相同 – 2013-07-04 09:23:37