‘Following code demonstrate how to count number of rows in Excel without opening it – using vbscipt in QTP.
Set objExcel=CreateObject(“Excel.Application”)
Set objWB=objExcel.WorkBooks.Open(“C:abc.xls”)
Set objSheet=objWB.WorkSheets(1)
msgbox objSheet.usedrange.rows.count
Set objExcel=Nothing
Its very helpful… Thanks buddy..!!!
short n nice
good buddy