Read text from text file and save it into a variable in qtp - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Read text from text file and save it into a variable in qtp (/Thread-Read-text-from-text-file-and-save-it-into-a-variable-in-qtp) |
Read text from text file and save it into a variable in qtp - arpan - 06-19-2013 Hi Guys, I've a text file(data) which has 3 lines as following: ABC DEF XYZ I'm reading the text file using the following command: Code: Const ForReading = 1 Now, i want to store the 3 values from text file into 3 variables in qtp. For example, V1=ABC V2=DEF V3=XYZ Can somebody please help me out?? RE: Read text from text file and save it into a variable in qtp - ssvali - 06-19-2013 i think instead of variables you can use Arrays. RE: Read text from text file and save it into a variable in qtp - basanth27 - 06-19-2013 Split is the keyword you should be looking at. Then storing in variables would be easy. RE: Read text from text file and save it into a variable in qtp - arpan - 06-19-2013 @ssvali : Thanks for your help. @basanth27 : Thanks for your help. I used Array and Split function and stored it in different variables. Again thanks ssvali and basanth27 for quick replies. |