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 Automate
Unanswered

undefined

(0) ShareShare
ReportReport
Posted on by 80

How to replace space with underscore from columns name in excel file in power automate desktop?

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I would do this in Excel. It will be much more efficient than trying to do it cell by cell with pad.

     

    You can use the recorder feature to try and get the windows UI elements, or another option would be to use hot keys which you can manage through the Send Keys command. 

  • lisha Profile Picture
    80 on at

    No, but the condition is not to use recorder or UI elements in the flow. So have to do it by other actions.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Then use Send Keys. Do it manually to find out, but for example, {Alt}(fo) would be file open. So, manually go to excel, press the Alt key, and you will see a bunch of letters pop up. Use those letters to navigate the ribbon to Home > Find & Replace > Replace. Then use Tab keys and inputs to get through the dialogue and you should be done. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    August update brings a new 'Find and replace cells in Excel worksheet' action, but it doesn't work in a specific range of cells.

    Try this:
    1. 'Launch Excel' with you file
    2. 'Focus windows', window class = XLMAIN
    3. 'Select cells in Excel worksheet' and select your column headers
    4. 'Send keys' {LControlKey}({U}) 'Ctrl + u: replace shortcut
    5. 'Send keys' {Space}{Tab}{LShiftKey}(_)
    6. 'Send keys' {LMenu}({T}) 'Alt+T
    7. 'Send keys' {Return} 'Enter

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard