内存不足workbooks.open(Excel到CSV)

时间:2017-05-04 20:57:01

标签: excel excel-vba csv vbscript vba

我正在运行以下脚本将.xls文件转换为.csv并获取错误。我该如何解决这个问题?

  

内存不足workbooks.open

 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
WScript.Echo "Done" 

0 个答案:

没有答案