cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SA41
New Member

How to convert multiple .xls files to .xlsx using Power Automate Desktop?

Hi,

I am trying to create a Power Automate desktop flow to open multiple excel files of the type .xls and convert it into .xlsx.

I have enclosed the file with the steps. On running the flow, the application does the job perfectly for the first work book via some components + desktop recording. However, when it tries to run for the subsequent workbooks, it throws an error as below.

Failed to press button (failed to get window)

1) It works fine for just one excel file that I recorded (ex: Book1.xls) and stops for the next excel file (Book 2.xls) though the tool bar of excel application never changes and I am passing the latest file name as a variable for the flow to look into every time. How can this be fixed? I see that the UI element is showing as "Window 'Book1- Excel'>Button 'File Tab' and is not recognizing the file tab for the next workbook that it has to convert.

2) Also, is there any alternative way of doing this via desktop power automate without using desktop recording?

Flow overview.PNG

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
MichaelAnnis
Memorable Member
Memorable Member

Your flow is fine, it is your UI elements.  They are all pointed at Window "Book1", so it's not able to point at the next set when you go to the next file.  Do this:

 

In the far right pane of edit mode, select the icon for UI selectors:

MichaelAnnis_0-1632413139453.png

Hover over the right edge of Window 'Book1.xlsx - Excel' and left click the 3 dots that appear:

MichaelAnnis_1-1632413225905.png

Click on Edit Selectors:

MichaelAnnis_2-1632413260792.png

Hover over the text that appears and again, select the 3 dots on the right, and click Edit Selector again:

MichaelAnnis_3-1632413333009.png

Here, simply uncheck the "Name"

MichaelAnnis_4-1632413427641.png

 

It will, by default, use the Excel program that is open, ignoring the name "Book1" and working for any open Excel UI.  All the other UI selectors should be a subset of the Window "Book1", so when you remove Window from this header selector, all the others should fall in line.   

 

Notice how my selectors are all subsets of Window "PartnerCloseRequests":

MichaelAnnis_5-1632413561878.png

 

So, if I were to uncheck Name, then these 3 selectors would work for any open excel window.

 

Best of Luck!

View solution in original post

VJR
Memorable Member
Memorable Member

Hi @SA41 

 

For point no 2:

 

After the 'Launch Excel' action use the below

 

VJR_2-1632465104376.png

 






-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.

 

 

View solution in original post

4 REPLIES 4
MichaelAnnis
Memorable Member
Memorable Member

Your flow is fine, it is your UI elements.  They are all pointed at Window "Book1", so it's not able to point at the next set when you go to the next file.  Do this:

 

In the far right pane of edit mode, select the icon for UI selectors:

MichaelAnnis_0-1632413139453.png

Hover over the right edge of Window 'Book1.xlsx - Excel' and left click the 3 dots that appear:

MichaelAnnis_1-1632413225905.png

Click on Edit Selectors:

MichaelAnnis_2-1632413260792.png

Hover over the text that appears and again, select the 3 dots on the right, and click Edit Selector again:

MichaelAnnis_3-1632413333009.png

Here, simply uncheck the "Name"

MichaelAnnis_4-1632413427641.png

 

It will, by default, use the Excel program that is open, ignoring the name "Book1" and working for any open Excel UI.  All the other UI selectors should be a subset of the Window "Book1", so when you remove Window from this header selector, all the others should fall in line.   

 

Notice how my selectors are all subsets of Window "PartnerCloseRequests":

MichaelAnnis_5-1632413561878.png

 

So, if I were to uncheck Name, then these 3 selectors would work for any open excel window.

 

Best of Luck!

View solution in original post

VJR
Memorable Member
Memorable Member

Hi @SA41 

 

For point no 2:

 

After the 'Launch Excel' action use the below

 

VJR_2-1632465104376.png

 






-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.

 

 

View solution in original post

Thank you so much @MichaelAnnis  !

Thank you so much @VJR 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,126)