Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP result in .xls file....Need Help...
#1
Not Solved Exclamation 
hi all....

It is a new requirement to me...I need to export each step showing in Run-Result Viewer after a run session, to an excel file. Though we can do it by manually, but i need to handle it in my code....

Actually the desirable thing is to generate an excel/CSV file after each run session with the same content showing in run-result viewer from Result.xml....And this should be handled in code.....i have also went through the parser concept but finally i was not successful.....

Can any body suggest me anything???Any help or suggestion will be appreciated.....



--------------
Thanx.
Reply
#2
Not Solved
I know that we can export it manually on the result by giving File--> Export report.

We can also write it to excel sheet at each checkpoint (or at reporter.reportevent event method) using datatable.exportsheet option but this would make the script lengthier and run time would also increase!

If you find any easier ways of coding it, kindly let me know as well..
Reply
#3
Not Solved
well "datatable.exportsheet" method is used to export only the runtime datatable nothing more than that.....in this case we need to insert each checkpoint output data to datatable in run time and if that particular command is executed at end after doing such code, then you will be able to get that result which you have inserted in run time along with your data present in datatable.......

Basically dat is not desired in my case....basically what exactly i need is to parse a html file to excel....coz i am able to get a html result file(not talking about xml file) after each run session by doing some settings.... i just need to convert that html file to an excel file using code.....we can do it manually as after opening that html file save it as .xls file....but i need the same thing using code.....that's exactly where i am stuck now......

I have also went through some codes from net to convert html to xls but till now i am not successful boss......


Any idea or demo code will be very much appreciated and will really help me a lot......



-----------
Thanx.
Reply
#4
Not Solved
why dont you automate the manual process of saving html file as .xls?
something like
Browser("actiTIME - Login").Dialog("Save Web Page").WinEdit("File name:").Set "a.xls"
Reply
#5
Not Solved
@@rajpes :--

Actually it can be possible by doing the manual process wid d help of automation...But my requirement is something different. I need to handle it by code...means it is also a code wat exactly u r saying, but this option has been kept as the last option....It will be better for me if i can handle it by parsing that html file to xls file....


By the way thanx a lot for your suggestion.....



-----------
Thanks..
Reply
#6
Not Solved
No suggestion available??????????
????????


Reply
#7
Not Solved
Well. I have a tried and tested solution for this.
You must be having an excel dataTable where u have steps or Test Data feeding to the steps.
Now, you can write Pass and Fail by setting the Row as per the steps.
at the end of the script export the excel sheet along with Pass and fail as per the steps.

Hope this helps.
Reply
#8
Not Solved
@@Tarik Sheth:--

Thanx Tarik Sheth for ur precious time and suggestion....i know this procedure....this is actually some different thing which you will get as exported.....

By the way can u tell me any vbcommand which can copy a file which file is already being accessed by some other process.....this is the last thing where i am stucked.....if any one can help me to copy a file in run time which file is already accessing by some other process then i'll be done...and also will post the method to get a proper result in excel file after each run session.......But plzz help me to copy that already accessed file using vbscript......i'm getting "permission denied" error when i'm trying to copy or move that particular file in run time with "CopyFile" or "MoveFile" method of FSO object.........



----------
Thanx.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP file compare - ignoring file structure Fede 3 5,294 02-17-2012, 02:48 AM
Last Post: Parke
  How to retrieve test result summary from a test result window using dp? jyotikrushna 3 5,259 09-30-2011, 09:24 AM
Last Post: rajpes
  Share xls file between many QTP scripts adam12 3 3,591 08-07-2011, 09:41 PM
Last Post: Tarik Sheth
  Link to a file in the test result window tennessee 0 1,999 01-24-2011, 07:31 PM
Last Post: tennessee
  How to get row count if xls file is generating dynamically. iamsekhar 10 10,337 08-26-2010, 12:08 PM
Last Post: iamsekhar

Forum Jump:


Users browsing this thread: 1 Guest(s)