Use simple code - Systemutil.CloseProcessByName "EXCEL.EXE"
On Wed, May 15, 2013 at 2:05 PM, Kumar Avinash <[email protected]>wrote: > Hi, > > how to close excel through QTP? > > There is a UI and Dialog window is displayed after clicking the Link on > the Web page. That window consist of 3 buttons, Open, Save and Cancel. If > user clicks the Open button ...It generate the Excel File. > > below is the code i wrote.. but this is not closing excel file. > > > Set Excel1 = GetObject ("", "Excel.Application") > > Excel1.Workbooks.Close > > Excel1.Quit > > Set Excel1= Nothing > > Thanks > Tushar > > -- > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
