I am using below code to read excel file: I want to print only first row data, for that I require to find no of rows in sheet (non blank) .
Set xlBook = GetObject(FilePath)
xlBook.Application.Visible = True
xlBook.Windows(1).Visible = True
xlBook.Application.WindowState = xlMinimized
Dim irow As Integer
For irow = 2 To 101
MsgBox xlBook.Worksheets(1).Cells(irow, 1).Value
Next