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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / create dynamic folders...
Power Automate
Unanswered

create dynamic folders with new excel workbooks in created folders

(0) ShareShare
ReportReport
Posted on by

I'm trying to create multiple folders with dynamic names and inside those folders creating excel workbooks with information taken from the web.

I have figured out how to create the folders with the dynamic name but stuck on how I would create a new excel workbook with a  dynamic name and save it into the current created folder.

 

For each row in Attached Spread sheet create a folder with the Manufacture ID and MFRNAME as folder name, then Create Excel Workbook in that folder with the file name as Manufacture ID.  

 

First Folder Name Should Be - 955 Tesla, 

Excel Workbook in that folder should be- 955

Second Folder Name Should Be - 956 ASTON MARTIN LAGONDA LIMITED

Excel Wordbook Should Be - 956

 

Any Help would be appreciated 

 

I have the same question (0)
  • Michael E. Gernaey Profile Picture
    52,972 Super User 2025 Season 2 on at
    Re: create dynamic folders with new excel workbooks in created folders

    Hi @Natron26 

     

    The only way to do it, is to have a template or templates of Excel already saved. Then you would use the Get File Content (SharePoint or OneDrive) actions.

     

    Then you would use Create File (SharePoint or OneDrive) action to essentially create your new dynamically named file.

     

    So it sounds like

    1. You use List rows in a table

    2. Apply to each (on that excel table) (step 1)

    3. Create your Folder

    4. Get the file contents of your Template

    5. Create file contents of new named file

     

    Done


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at
    Re: create dynamic folders with new excel workbooks in created folders

    @FLMike seems to not have noticed this question is posted in the forums for Desktop flows, and has thus suggested the solution that would be required if you were doing this in Power Automate cloud flows.

     

    The correct way to do this in PAD is to simply use Launch Excel action with a blank file and then use Save Excel action and save it as whatever name you want. Similarly to how you pass variables to the folder names, you can also pass variables to the file name in Save Excel.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Natron26 Profile Picture
    on at
    Re: create dynamic folders with new excel workbooks in created folders

    Thanks for this, Once I write to a new document and save it as the name I want, how to I save it to a created folder?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at
    Re: create dynamic folders with new excel workbooks in created folders

    There is a "create folder" action.

     

    Before saving, I would run this:

    If %SaveFolder% does not exist
        Create Folder %SaveFolder%

    End(if)

     

    Good luck!

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at
    Re: create dynamic folders with new excel workbooks in created folders

    When you create a folder using Create folder, you will have a variable called %NewFolder% (this is the default name, assuming you did not change it) that stores the new folder. You can use that in the Save Excel action to save it in the new folder by following the syntax like this: %NewFolder%\%FileName% (assuming you have the file name in the %FileName% variable).

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard