10/06/12 19:09:10
WSFでExcelへの参照を明示する手もある。拡張子wsfでたぶんこんな感じ。
<?xml version="1.0" encoding="Shift_JIS" standalone="yes" ?>
<job>
<reference guid="{00020813-0000-0000-C000-000000000046}"/>
<script language="VBScript">
<![CDATA[
Set getExcel = WScript.CreateObject("Excel.Application")
getExcel.Workbooks.Open("C:\book1.xls")
For i = 65536 To 1 Step -1
If getExcel.Worksheets(1).Cells(i, 1) <> "" Then
e = i
Exit For
End If
Next
WScript.echo("last row:" & e)
]]>
</script>
</job>