How can we open an Excel sheet through the script
Answer Posted / sreekanth chilam
HI All,
Try for this three ways given below :
1.
SystemUtil.Run "excelsheet path"
2.
Dim xl
Set xl=CreateObject("Excel.Application")
xl.Visible=True
xl.WorkBooks.Open "ExcelSheet path"
xl.ActiveWorkBook.Save
xl.Application.Quit
Set xl=Nothing
3.Dim xl
Set xl=CreateObject("WScript.Shell")
xl.Run "Excel.exe"
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
What is Cross browser testing? Does UFT support it?
tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?
What is the process of synchronizing qtp and aut?
Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.
What are the methods used in UFT to handle exceptions or run-time errors?
What VBScript operators, functions, and statements do you use in QuickTest Professional?
Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.
How to test login module with different username and password by using data driven testing in QTP?
your coming from electrical backgroung..but y ur coming to software side?
What are the ordinal identifiers in web page?
How many ways we can parameterize data in quicktest professional?
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next
Suggest and Define a solution for an application whose objects are not recognized by UFT?
How did you use regular expressions in QTP and also in WR?