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.
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? */
… }
}
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
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