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: 11 Years, 3 Months, 3 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 2,790 09-13-2018, 02:11 PM
Last Post: ProTester
  Searching for and selecting row in Datawindow zsl0009 0 2,799 08-04-2015, 01:02 AM
Last Post: zsl0009
  Fetching total number of records inside a webtable vidya2k2 2 3,877 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 2,804 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 2,787 11-13-2013, 10:24 PM
Last Post: sai rajesh

Forum Jump:


Users browsing this thread: 3 Guest(s)