Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PJfAj8Iyv/6+21RnotkWA/
Power Automate - Power Automate Desktop
Suggested answer

Using variable when saving file in the file name

Like (0) ShareShare
ReportReport
Posted on 24 Jan 2025 09:58:22 by
Hi
I have a workflow where I extract data and want to save each data object into its own excelfile. 
So I have a Variable FileName and want to use it when I save my excel file. I have tried to search around and understod I should have the file path as "C\Excel folder\%FileName%.xlsx"

Problem I get is that the excel file is save as %FileName% instead of the value of the variable. How should I write the document path to get the value of the variable into the file name?


 
 
Categories:
  • Suggested answer
    eetuRobo Profile Picture
    3,268 Super User 2025 Season 1 on 25 Jan 2025 at 05:43:24
    Using variable when saving file in the file name
    %variableName% -syntax is in default PAD flows. You are using Power Fx enabled flows. Power Fx never uses percent signs for variables.
    For Power Fx it either =VariableName or ${VariableName}

    In your case use the following: C:\Excel Extract\${FileName}.xlsx

    I recommend using the PADs "Select variable" option to get the correct syntax. So put the cursor where you want the variable to be and click the variable icon and then select the correct variable


     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 13 Super User 2025 Season 1

#2
John_Mavridis Profile Picture

John_Mavridis 6 Microsoft Employee

#3
KO-05050229-0 Profile Picture

KO-05050229-0 4

Overall leaderboard
Loading started