How to maximize Excel window

Hi, I am wondering how can I make sure that the excel file I am working with is maximized? I tried several ways but none of them is working, I’d appreciate it if you can get me some insight on this issue. Thanks!


From my side having an attach window activity with this as selector works fine when I just add a maximize window activity inside.

<wnd app='excel.exe' cls='XLMAIN' />

A Click Activity would to it too having as Selector
If you are using Windows10, I recommend you to use simulate click since the effective(hidden) maximize element area overlap the close one, a classic click actually closes the window on my current machine.

<wnd app='excel.exe' cls='XLMAIN' />
<ctrl name='Maximize' role='push button' />

If you would have several Excel apps open in the meantime you could tune the selectors with specific titles too.



If you know it’s never going to start maximised, an easy option would be to just send a “Ctrl - F10” hotkey in the excel application scope.



Hi David,

From my current environment, (Win7 pro, Uipath 2016.2)

This is not working out for two reasons.
First Sendkey does not inherit selector from Excel Application scope (might be fixed by Moonlight).
Second CTRL+F10 just pin/unpin the Workbook from it’s Excel application container

However the windows shortcut (Win+Up) to maximize windows is valid it would still require to target the selector.
Win+Up can also be pressed regardless if it is already maximized or not.

Just by curiosity, what is the excel version and operating system you are using?


The test I did above was Windows 10 Pro, Excel 2013 & UiPath 2017.1

Hi there,

Below format worked for me. why dont try this way? Thanks


If you don’t know if it will start maximized or not, you can use win+up key combination


Could you please show a screenshot with the activity and syntax used to do this? Thanks!

i have tried both way like win+up and active win, but still it doesn’t maximizeMain.xaml (12.7 KB)

can anybody help me

This is the best way to maximize an excel window.