strTarget = "C:\TEMP\excel\Book1.xls"
ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strTarget & ";" & _
"Extended Properties=""Excel 8.0;IMEX=1;"""
on error resume next
Cn.Open ConnectionString
if Err.Number <> 0 then
WScript.Echo Err.Description
Wscript.Quit
end if
on error goto 0
' 処理
Cn.Close
|