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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy Excel File then E...
Power Automate
Unanswered

Copy Excel File then Edit it

(0) ShareShare
ReportReport
Posted on by 39
Hi All,
I am trying to build a flow that will copy an Excel template to a temp directory on a SharePoint site, then Update Rows on the new file.
 
The Excel file contains a table (named data) that looks like this,
 
The first few steps in my flow are to fetch the template file, create variables for the temp path and the new file name, then save the save using the temp path and file name. This is all working fine. 
 
The next step in the flow is to update a row in the table of the new file and this is where my problem is. I suspect it's happening because the file name created previously is dynamic and when I and building the flow, the actual file being updated does not yet exist. Anyway, the action looks like this,
The File property is simply a concat of the temp folder and the new file name, which I have confirmed to be correct, and the file does indeed exist after the flow completes.
 
When the flow runs, it errors on the Update Row action with the following message,
{
  "status": 400,
  "message": "A value must be provided for item.\r\nclientRequestId: 7e4e0be7-3f3b-4945-8532-d5253919a8f5",
  "error": {
    "message": "A value must be provided for item."
  },
  "source": "excelonline-eus.azconn-eus-003.p.azurewebsites.net"
}
If, however I remove the dynamic file naming, and build the flow so that it points to a file that already exists, the Update works.
 
Can anyone tell me how to copy an Excel file, them properly apply updates to it?
Thanks
Kevin
 
Categories:
I have the same question (0)
  • Suggested answer
    NsL Coder Profile Picture
    475 Super User 2025 Season 2 on at
    Hi, this method works for some actions but not others, so you can try it.
     
    Your issue is b/c the file doesn't exists yet, so you can't really "setup an action" to update a file that doesn't exists.
     
    The workaround is to use an exactly same file (so select the file that exists and is exact the same as what would be the file you will update) and edit the Update row action as you need it. Once you done (do some test) and is happy, then you can replace the "File" field with the dynamically created file within the flow.
  • KevinBod Profile Picture
    39 on at
    I don't think this is because the file does not exist. If I hardcode the file path to an existing file, it works. However, if I use a dynamic file name, but still point to the same existing file, it does not work.

    When changing to a dynamic file, the action's required fields change from this,
     
    to this,
     
    For the dynamic file name, I have tried setting both the item properties and the item/value, to a json object (i.e. {"ID":"myIDValue"}), and while the flow runs without errors, the value in the Excel file is set to 0.
     
    Has anyone successfully been able to update an Excel file from a dynamic name?
    Thanks for looking
    Kevin
  • Suggested answer
    NsL Coder Profile Picture
    475 Super User 2025 Season 2 on at
    just tried it out
     
    You can see that even though Power Automate show you the file name and table name, when you actually run the flow and check the input of the update row action, you can see that it isn't really "english". It is "ID" of some sort, File ID and Table ID, and this is what "selection" does in the action, it load the english for you to select, but use the "ID" in the "coding". 
     
    That is why directly "typing" in the field file and table name doesn't work. You can get the file ID from the create file action that you use to create the excel file within the flow. Then get the Table ID from the Create table action's output Name field.

    Now, IF your excel file is a "COPY" of an existing template file, while the FILE ID is still going to be different, the Table ID remains the same, so you can directly enter the Table ID from the existing template file.
     
    Now, the issue you are going to have is, when you create the Update a row action, if you are trying to use the File ID and Table ID, since the file doesn't exists yet, Update a row isn't going to know what to "do" (can't display the columns for you to fill in content with on a table that the flow can't load column info on). This goes back to my original suggestion, that you need to use an existing excel file that WOULD be the same structure as the future dynamically created excel file, fill in everything as you want it. THEN lastly change the File and Table field to the dynamic content of the ID for each.

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard