How to maximise excel workbook?

Hi all,

How can I maximise the excel workbook in UiPath studiox before continuing with actions?

My downloaded excel workbooks are so minimised that the actions cannot be performed.

Looking forward to replies.

Thank you!

Hi @chk

You can use UiPath’s “Attach Window” activity to select the selector of the Excel file that you have opened and then use the “Maximize Window” activity inside the “Attach Window” activity

Check out this thread

You can also use UiPath’s “Get Active Window” activity to bring the window front

Check out the thread


Hi @chk

On opening excel, execute the following macro to maximise the excel window:

Sub MaximizeExcelWindow()
    Application.WindowState = xlMaximized
End Sub

Hope this helps,
Best Regards.


May I know what actions you want to perform?

Generally for excels we have dedicated activities…please check


1 Like

Hi all, I just realised there is a an option to resize window to be maximise under properties. Will try it and let all know.


Hi @arjunshenoy, how to run the macro on a new downloaded workbook? Or does the macro needs to exist already in a a workbook / excel file?



  1. Store this macro in a textfile & keep the text file in your project folder (preferably).
  2. Use an activity ‘Invoke VBA’.
  3. For the activity, give in code file path of this text file & set the entry method name as ‘ MaximizeExcelWindow’

By this way, you can use the same macro for n number of times in your process.
Note: In order for this activity to work, Trust Access to the VBA project object model must be enabled from Excel (File > Options > Trust Center > Trust Center Settings > Macro Settings > Select the Trust Access to the VBA project object model check box).

Hope this helps,
Best Regards.

1 Like

Thanks will try this out in future!

This option works perfectly. Thanks all for the discussion!

1 Like