Excel Application Scope or Attach Window? For Maximizing Excel window?

I want to maximize an Excel window, but I have been struggling for DAYS! and I still haven’t been able to achieve it.

Since I have lots of Excel operations to do to the Excel file, I am using Excel Application Scope. I have the following, but it is not doing what I want it to do.

Excel Application Scope {
Sequence - Maximize Window {
Send Hotkey : Alt + Space
Send Hotkey : x
… }
Sequence - Operations {
… /* Omit */
… }
}

If I do it on my own, like manually open an Excel file, and then do Alt+Space, and then x, it works and it does maximize the Excel window. But the above code doesn’t!
It opens the Excel file in the background. Sometimes, it opens in the foreground, but it doesn’t maximize the window.

I thought about using Attach Window, but since I have lots of Excel application activities, I feel like I need to use Excel Application Scope instead, inside which I do all the operation.

Or Should I use both? Would it be like:
Excel Application Scope - Do {
Attach Window - Do {
… … /* Is this even correct? */
… }
}

Hi @tomato25
try with send hot key ctrl + F10
hope That would work
Cheers

2 Likes

I actually have tried that and it never worked.

The Problem is, sometimes the window opens in the background.

Fine
i tried to reproduce the issue
–use excel application scope and pass the file path
–use a Get active window activity and place it as a first activity in the Do container of Excel application scope
–inside this Get active window scope use Maximize window activity
–this will surely maximize the excel window
–this will also help us to bring that in foreground

Cheers @tomato25

1 Like

and I don’t wanna use both Excel Application Scope and Attach Window at the same time… This is a bit too much.

1 Like

I suggested Get Active window @tomato25

Cheers @tomato25

1 Like

Did not work… It didn’t even bring the Excel window to the foreground, if Excel Application Scope opened the Excel file in the background.

The reason we have no activities of excel inside the scope so it didnt last for long time to show that it is in foregroun
Fine
–use start process activity and pass the file path as input
–next use the same get active window and use maximize window activity
this is done to make sure that the window is maximized at any cost

–even this situation can be handled with start process activity
use a assigna ctivity and mention like this
out_filepatharray = Directory.GetFiles(“yourfolderpath”,“*.xlsx”)
where out_filepatharray is a variable of type string array
–use a for each loop and pass the above variable as input and change the type argument as string in the for each loop propertypanel
–inside this use a start process activity and mention the filepath input as item, as that is the variable that holds the file path from the for each loop
–then remaining same

Hope this would help you
Cheers @tomato25

2 Likes

any issues still @tomato25
Cheers

No sir! It works now! Thank you very much for your help!

Cheers @tomato25

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.