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 / Copy excel file templa...
Power Automate
Answered

Copy excel file template in correct folder and fill in with data

(1) ShareShare
ReportReport
Posted on by 98

Hi everyone,


I want to use Power Automate Desktop to copy an Excel file that contains a template and then save and fill it in another folder.

The problem I'm facing now is that I can fill in the template, but it saves it in the same location. So, if I run the flow again the next day, the template will already be filled in.


I want the Excel template to remain empty, and I want to copy it, place it in the correct folder, and then fill it with the data I have.


I tried using a vbscript, but unfortunately that didn't work for me either.

If you may have other ideas, please let me know


See below how I have it now; ---> %Path_VerslagenFolder% is the folder where i want to save it. 

Anonymous34_0-1720536347438.png

 


Thank you! 

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

    Getfiles

    Copy Files0

    Then use %CopiedFiles[0]% to reference the new document.

  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Anonymous34 

     

    Please follow the below approach and steps:

     

    • Get files in folder: Retrieve the files in the folder Path_Opslaan_ExcelDocumenten that match *.xlsx and store them into FilesDownloaded_4PS_List.
    • Copy File: Copy FilesDownloaded_4PS_List[0] to %Path_VerslagenFolder% and copiedfile would be stored into CopyFiles variable
    • Launch Excel: Launch Excel and open the copied file in %CopyFiles[0].FullName% using an existing Excel process and store it into ExcelInstance.

    Deenuji_0-1720543024474.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

  • mathiaskjeldsen Profile Picture
    224 on at

    What about setting a variable as a date in front of the file name, so every time an error occurs, it runs the process and saves it in an excel file with a date as prefix? Whenever you get the error, it will be a new date/time, and therefore the name of the file will be different meaning you won't save on top of the same file? I did that in the beginning of this video, and I use it quite often. 

     

    Automate Excel File Opening with Date-Driven Flows in Power Automate Desktop

  • Anonymous34 Profile Picture
    98 on at

    Hi @Deenuji,

    It works! Thank you !!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard