The xls contain data. how to get number of columns form
the sheet?
Answer Posted / uday
strFilePath="D:\EmpDetails.xls"
Dim fileSysObj
Set xlObj=createobject("Excel.application")
Set xlWorkBookObj=xlObj.workbooks.open(strFilePath)
Set xlWorkSheetObj=xlWorkBookObj.worksheets(1)
intRowCount=xlWorkSheetObj.UsedRange.rows.count 'intRowCount
=xlWorkSheetObj.rows.count - it returns the number of rown
in an Excel sheet
intColCount=xlWorkSheetObj.UsedRange.columns.count
' intColCount=xlWorkSheetObj.columns.count - it returns the
number of columns in an Excel sheet
msgbox "No. of rows used "&intRowCount&" and No. of columns
used. "&intColCount
xlWorkBookObj.close
xlObj.application.quit
Set xlObj=nothing
Set xlWorkBookObj=nothing
Set xlWorkSheetObj=nothing
http://hpsqtp.blogspot.com/2009/04/how-to-find-number-of-
rows-and-columns.html
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How can get count of list box?
What is the descriptive programming?
What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.
Have you done batch testing in qtp? If yes how you are doing?
what function you write to do database testing with the help of qtp?
What are the Application Functions available in QTP?
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u
What are the two types of repositories available, explain them?
Explain different types of checkpoints?
What are the types of object repositories? Which one is you using?
Explain about the test fusion report of quicktest professional?
How can i check items sorted or not in a weblist ? Give me the script for this...
How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in