QTP Script To retrieve no.of columns and no.of rows in an excelsheet.
In excelsheet we have values as shown below
A B C
1 aa ll
2 bb aa
3 cc xx
4 dd mm
5 ee ii
Check This Post for Reading Specific cell value from excel sheet using VBScript in QTP
VBScript to get rowcount and columncount.
Set a= CreateObject("Excel.Application")
Set b=a.workbooks.open("d:\es.xls")
Set c=b.worksheets("Sheet1")
column_count= c.usedrange.columns.count
row_count= c.usedrange.rows.count
Msgbox "No.of Columns="&column_count
Msgbox "No.of Rows="&row_count
b.close
Result:
No.of Columns=3
No.of Rows=5
SQL Queries Collection
Movie Songs Lyrics
QTP Script to export database data to excel sheet
VBScript to Check Whether Particular File Exists or Not.
Check this Post for Datatable Methods.
Excel Sheet Creation and Writing Data Into It
Data Driven Using Excel Sheet
Data Driven Using Notepad
Showing posts with label vbscript to get rowcount from excelsheet. Show all posts
Showing posts with label vbscript to get rowcount from excelsheet. Show all posts
QTP Script to get Excelsheet Rowcount and Columncount
Subscribe to:
Comments (Atom)