I have the webtable. In my table I have the Column headers like this Student No, FName, LName, Score Student No. FName LName Score 001 aaa bbb 123 234 568 How can I calculate the Sum of the Score (I mean 123+234+568=925) Please any one help me. Thanks sai
In Excel you would use the SUM function but I suspect that you are looking for how this would be done in QTP -
Lynne I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison
Hi Lynne I know SUM Function in Excel. But i am looking in qtp
You can use Excel functions in Data sheet also.
Regards, Tarun Buy the NEW QTP Descriptive Programming Unplugged Book ** Download QTP Unplugged 2nd Edition eBook for FREE **
Hi Tarun, Could You please tell me How can i use the Excel function in the Data Sheet. Thanks Sai
DataTable("Test2")="=SUM(A1:A4)" Msgbox DataTable("Test2")
Hi Tarun, When i use this code it's not working DataTable("A",dtlocalsheet)='=SUM(A1:A3)" res=DataTable("A",dtlocalsheet) Msgbox res Result: Msgbox display 1000 MyExcelSheet Like this SheetName is Action1 Column name is A Rows is 1 2 3 When i add Row2+Row3 it's working correct But when i add Row1+Row2+Row3 it's not working Please help me. Thanks sai
Hi, The excel sheet of a QTP script is saved at the some hard drive. So the functions you want to use on the Excel sheet can be done at this place. This Excel at hard drive will follow up in QTP script. Thanks, Amol
You can use the formula on the same column that you are trying to output Now doing DataTable("A",dtlocalsheet)="=SUM(A1:A3)" you are refering to A1 to A3 and assigning the value to A1 so which would be circular reference.
Thanks Tarun, And i have one more question how can i get the particular cell value from DataTable. Example: In datatable 4 Column and 4 Rows I want 3 Column 2 Row (i mean cell(3,2)) value How can i get it. please help me. Thanks
Forum Rules