' ------ KONFIGURACJA SKRYPTU ------
strExcelPath = "c:\data.xls"
intStartRow = 2
' ------ KONIEC KONFIGURACJI ---------
On Error Resume Next
set objExcel = CreateObject("Excel.Application")
if Err.Number <> 0 then
    Wscript.Echo "Excel nie jest zainstalowany."
    Wscript.Quit
end if
On Error GoTo 0

objExcel.WorkBooks.Open strExcelPath
set objSheet = objExcel.ActiveWorkbook.Worksheets(1)

intRow = intStartRow
do while objSheet.Cells(intRow, 1).Value <> ""
    WScript.Echo "Wiersz " & intRow
    WScript.Echo "Komrka 1: " & objSheet.Cells(intRow, 1).Value
    WScript.Echo "Komrka 2: " & objSheet.Cells(intRow, 2).Value
    WScript.Echo "Komrka 3: " & objSheet.Cells(intRow, 3).Value
    WScript.Echo "Komrka 4: " & objSheet.Cells(intRow, 4).Value
    intRow = intRow + 1
    WScript.Echo
loop

objExcel.ActiveWorkbook.Close
objExcel.Application.Quit
Wscript.Echo "Gotowe"
