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 / Read from txt/xlsx fil...
Power Automate
Unanswered

Read from txt/xlsx file with PAD variable name

(0) ShareShare
ReportReport
Posted on by 13

hi 

 

I am trying to read a text from a file

e.g. select * from tbl_name where name = %xyz%

Here xyz is the name of a variable in PAD. 

 

Problem - I can read the text from file but the variable name never gets evaluated. 

Are there any escape sequences that I am suppose to use ? What am i missing?

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

    Sorry, I am not understanding, are you trying to read a single row with the first column as the name, a single column with the first row as the name, or an entire table with the table_name as the name?

  • aatif Profile Picture
    13 on at

    I have cell in an excel with the below text value. I read it in PAD and store it in a variable %excel_var%.

    select * from tbl_name where name = '%xyz%'

     

    In PAD variable %xyz% = 'John'

    When I set %excel_var% as an input to "Ëxecute SQL" i expect it to execute this - 

    select * from tbl_name where name = 'John'

     

    Instead it executes this - 

    select * from tbl_name where name = '%xyz%'

     

     

    I am only trying to execute the SQL statement in a loop because my variable %xyz% will keep on changing.

    Hope that was easier to understand.

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    So, if your excel has %xyz% in the text, it is going to record that exactly how it is. %xyz%. 

    My recommendation would be to either 1) remove that text from Excel, if possible, and add %xyz% to the end of the “read text from file”, or 2) use “replace text” and replace %xyz% with the variable %xyz%.

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