Search code examples
qtphp-uft

How to maximize XL file using QTP/UFT?


I want to maximize XL file using qtp/uft. I got few solutions but didn't work. My code is

Set pixXLS = CreateObject ("excel . application")
pixXLS.Application.Visible= True
pixXLS.Workbooks.Open "C:\ Breakout Matrix.xls "

File get open but not in full screen mode.


Solution

  • Add this line to your code to maximize:

    pixXLS.WindowState = -4137
    

    Also, refer this link for Excel Enumerated Constants: https://msdn.microsoft.com/en-us/library/bb216429(v=office.12).aspx