How to maximize Excel window

excel
activities

#1

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!


#2

Hello,

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.

Cheers


#3

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.

image


#4

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?

Cheers.


#5

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


#6

Hi there,

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