web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PAD to refresh Power Q...
Power Automate
Answered

PAD to refresh Power Query (aka Data/RefreshAll) via Send Keys

(0) ShareShare
ReportReport
Posted on by 59

I have had limited success in using PAD to open an Excel file and perform a Data/RefreshAll function. It seems trivial, but has been problematic for me. 

 

My current approach is to use PAD's "Click UI element" function to select "Data" from the Excel Ribbon, then "RefreshAll". For some reason, PAD cannot consistently do this. My flows can go for days just fine (100% success rate) then start failing (less than 50% success rate). After trying many "fixes" I am now looking for an alternative approach. 

Instead I would like to try the hot-key for Data/RefreshAll which I understand to be <Ctrl><Alt><F5>. I believe the Send Key sequence should be coded as:

PentaGalDad77_0-1620842225808.png

If you can't read the image, the Text to Send value is: {Control}({Alt}({F5}))

 

This Send Key sequence is ignored when the flow executes. I have tried both "hardware key" options.

 

I also tried recording a macro which determined the Text to Send value should be: {LControlKey}({LMenu}({F5}))

This was ignored also. 

 

Appreciate any guidance.

I have the same question (0)
  • FEDE1 Profile Picture
    2 on at

    You can try adding a step that executes a macro in the workbook and you create this macro that refreshes all the data. To be able to do this, you will need to save the workbook as XLSM.

     

    Sub RefrescarConsulta()
    ActiveWorkbook.RefreshAll
    End Sub

  • Verified answer
    kinuasa Profile Picture
    799 Most Valuable Professional on at

    I suggest to set the book path to a variable(%WorkbookPath%) in the "Set variable" action and execute the following code in the "Run VBScript" action.

     

    GetObject("%WorkbookPath%").RefreshAll

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard