| || |
Tranfering data from TXT to XLS
I have a security test report of our company's website in a TEXT file. Is there any way that I can transfer the data in txt file to an xls file using QTP. Please let me know.
Re: Tranfering data from TXT to XLS
Open the txt file using filesystemobject and then save as xls file.
Hi, I use Convertio to convert TXT to XLS files. It's a free online service you might want to try it and see what you get.
You can do this programatically which is a bit more time consuming.
Do something something like this:
A) Put the value of the txt into a single string or one line at a time.
B) Parse on the separator and put into an array.
C) Create a workbook, file, worksheet. Cycle through the array and put items into the excel sheet.
We can assist with details.
I would recommend creating an excel automation object and importing the text file. if it's delimited in some way, excel should be able to sort it out. Then you just use SaveAs and you've got your excel file.