dim oExcel,oWb,oSheet
Set oExcel= CreateObject("Excel.Application")
oExcel.Visible = True
on error resume next
Set oWb = oExcel.Workbooks.Open(left(wscript.ScriptFullName,instrrev(wscript.ScriptFullName,"\")) & "测试文件.xlsx")
if err<>0 then
msgbox "本文件夹中无“测试文件“工作薄,需建立该表"
oExcel.WorkBooks.Close
oExcel.Quit
wscript.quit
end if
Set oSheet1 = oWb.Sheets("已生成表")
Set oSheet0 = oWb.Sheets("待生成表")
if err<>0 then
msgbox "“测试文件“工作薄中无“测试文件“工作表或“测试文件“工作表,需按规范设置工作表名"
oExcel.WorkBooks.Close
oExcel.Quit
wscript.quit
end if
msgbox "检验通过!"
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。