Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can get count of list box?

1060


What is the descriptive programming?

1952


What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.

2093


Have you done batch testing in qtp? If yes how you are doing?

875


what function you write to do database testing with the help of qtp?

1765


What are the Application Functions available in QTP?

1953


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1804


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

1743


What are the two types of repositories available, explain them?

969


Explain different types of checkpoints?

959


What are the types of object repositories? Which one is you using?

1124


Explain about the test fusion report of quicktest professional?

886


How can i check items sorted or not in a weblist ? Give me the script for this...

1984


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)

1908


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1965