Way to take values from datasheet and output - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Way to take values from datasheet and output (/Thread-Way-to-take-values-from-datasheet-and-output) |
Way to take values from datasheet and output - Fairbanks - 03-27-2014 Hi, I would like to take the data from 2 columns in my datasheet and group them in groups of 17. So take the values from rows 1 to 17 from column A and B and write them out to the screen. Then do the same thing from row 18 to 34, etc etc until the last group has less than 17 (meaning its the end of the rows in the sheet). Thinking of doing a loop and some sort of step 17 until i reach the count but not sure exactly how to go about it. Thanks! RE: Way to take values from datasheet and output - Ankur - 03-27-2014 I am not sure what is your 'Use Case' but here is what can be done -
RE: Way to take values from datasheet and output - Fairbanks - 03-27-2014 Thanks for the quick reply! I am pretty new to QTP, vbscript, and coding in general. What do you mean by Mod? Basically im automating the payment of accounts. There is a script im piggybacking off that takes an account and quotes it, checks to make sure the amount is correct and then goes to the next account. What im trying to do is then take that account number and the $ amount and throw it onto a terminal screen. So account number will be in one column on the screen, each account number on its own line(17 lines total). 2 columns over i will have to have the corresponding $ amount for the account. RE: Way to take values from datasheet and output - Ankur - 03-27-2014 mod operator gives you the remainder. This is standard across scripting/programming languages. Nothing too fancy. I am sure you will get a hang of such operators quickly as you start working on them. You can try with Code: msgbox 19 mod 5 |