While working with Oracle apps, it generates reports. On saving them i get plain text files. Is there any way to retrieve data (for example batch no...6557 etc.) from this file. I am able to do this using FileSystemObject(reading through file by taking some indicator lines/columns and fetching data using string functions) but i don't think this is the proper way. Is there any other way to do so, so that i can retrieve data from that file using QTP utilities/functions.
Actually I am novice to QTP so i thought there might be any other mechanism to output the value from plain text file(like..output check point....qtp recognizes all the data in the file as a single line) which may reduces the lines of code which i have written to retrieve the required data.
I had similar problem, I choose two approaches using FSO and exporting text file to excel and then reading excel file. I found FSO approach simple, you can use Mid and InStr functions to read this file. If your files are of similar structure then you can simply write a reusable function to read these files.
Yes Unmesh. Actually the FSO may probably be the only option here because even copying the file to Excel is going to save the entire text file contents in one single cell.
Moreover Hafiz, reading from the FSO will probably require 10 lines at the most...this includes your copy/paste, read and search. In general I have found QTP's execution time to be faster while working with notepad files than with Excel.
Good luck. Let us know if you do find another alternative. It's always handy to know a few different approaches.
(I'm hiring Software Development Engineers in Test in Seattle, WA)