Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the total no. of columns used for a particular row
#6
Solved: 12 Years, 10 Months, 2 Weeks ago
HI Swetha,

I wrote one user defined function which takes requires row number as an Input argument/Parameter.

1. Refer the below function defination :

Code:
Function Column_Count_Retrieve(Rownumber)
     Datatable.Getsheet("Global").SetCurrentrow(Rownumber)
     Temp=0  
            Col_Count=Datatable.GetSheet("Global").GetParametercount      
                 for j=1 to Col_Count
                         Val=Datatable.GetSheet("Global").GetParameter(j).Value
                               if Val<> "" then
                                     Temp=Temp+1
                               end if
                  Next
      msgbox   "Row  " &Rownumber&"   :   "&Temp&" rows"
End Function

2. Call the above function as given below :

Call Column_Count_Retrieve(3) ' Calling the function for finding the no. of columns used by 3rd Row
Call Column_Count_Retrieve(1) ' Calling the function for finding the no. of columns used by 1st Row
Call Column_Count_Retrieve(2) ' Calling the function for finding the no. of columns used by 2nd Row

I hope now your requirement has been solved.
Reply


Messages In This Thread
RE: How to get the total no. of columns used for a particular row - by sreekanth chilam - 01-03-2009, 06:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing two unsorted excel columns ProTester 2 3,371 09-13-2018, 02:11 PM
Last Post: ProTester
  Searching for and selecting row in Datawindow zsl0009 0 3,114 08-04-2015, 01:02 AM
Last Post: zsl0009
  Fetching total number of records inside a webtable vidya2k2 2 4,479 06-15-2015, 02:55 PM
Last Post: venkatesh9032
  How to Delete Rows with duplicate values in 1 columns in excel thru QTP. arpan 0 3,152 02-09-2015, 08:47 PM
Last Post: arpan
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 3,164 11-13-2013, 10:24 PM
Last Post: sai rajesh

Forum Jump:


Users browsing this thread: 1 Guest(s)