The xls contain data. how to get number of columns form
the sheet?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ur
To get the column count use.
allCols = DataTable.GlobalSheet.GetParameterCount
Msgbox allCols
Is This Answer Correct ? | 5 Yes | 2 No |
for outside xls sheet we have follow below
datatable.addsheet("Sheetname")
datatable.importsheet("sheetname",sheetid,"sheetpath")
rowcount=datatable.getsheet("sheetname").getrowcount
msgbox(rowcount)
for globalsheet
rowcount=datatabe("GlobalSheet").getrowcount
msgbox (rowcount)
for actionsheet
rowcount=datatable("LocalSheet").getrowcount
msgbox (rowcount)
Is This Answer Correct ? | 2 Yes | 4 No |
WHAT IS ENVIRONMENT VARIABLES?
7 Answers AZTEC, CTS, Ready Test Go,
Can any one please explain hwo to test client/server application using QTP?
can anyone answer this question ........in the DICTIONARY OBJECT....i created the dictionary object in reserved object ok....here i have some sets of values ...now i want to retrieve the item i done too ok.......here my question is now i saved the test and close the qtp tool ,again i opened now i retrieve the same item in the dictionary is it possible ????. friends when i try to do this i am getting empty message box i mean no value will be retrieved ......ans me any one plz...
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
How QTP integrate with application?
How do we retrieve the content from a text box in a web page
UFT 12.02 which ALM version will support
What is Descriptive Programing? In which cases, we will go for descriptive programing?
anyone can explain about "Smart Identification" in QTP I mean what is the use of "Smart Identification" Give an example
What are parameterizing tests?
How to create frame work for qtp?
1 Answers Bank Of America, Polaris,