vbscript处理Excel文件打开错误 [英] vbscript to Handle Excel file Open Error

查看:141
本文介绍了vbscript处理Excel文件打开错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个vbscript打开excel 2010文件.但是由于文件已损坏,它无法打开文件.我知道如何处理VBA中损坏的文件.

有没有办法在VBScript中处理损坏的文件?

VBA代码:

i have a vbscript to open an excel 2010 file. But it doesn''t open the file since the file is corrupted. I know how to handle corrupted file in VBA.

Is there a way to handle corrupted file in VBScript?

VBA Code:

workbooks.Open Filename:=abc.xlsx CorruptLoad:=XlCorruptLoad.xlRepairFile


任何帮助将不胜感激.


Any help would be appreciated.

推荐答案

VBScript不支持可选参数,因此您需要传递每个Open 期望的参数,并为那些您不想指定的内容.
VBScript does not support optional arguments, so you need to pass in every single argument that Open expects and pass a null string for those that you do not intend to specify.


这篇关于vbscript处理Excel文件打开错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆