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 Automate - Building Flows
Answered

How to get the file content of a Excel file that is modified with a new row or created a new row.

(0) ShareShare
ReportReport
Posted on by 255

content.PNG

 

I don't know how to get the new/updated Excel file in SharePoint. (The SharePoint 'create file' is in a Microsoft Teams location)

 

In 'file Content' I only see the things that are in the condition (so the attributes of 'Add a row into a table' and 'Update a row'). Do some one know how to fill the 'file Content' of the new files if they are created or modified? I just want to copy the new Excel file in a new SharePoint location (Teams). 

content2.PNG

I have the same question (0)
  • Jay-Encodian Profile Picture
    2,920 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    Hi @ahmadbutt 

    When creating a new file use the SharePoint 'Create File' action.

    If you're updating a file you should use the SharePoint 'Update file' action... though the 'Create file' action will overwrite if you have used the same filename.

    If you need to do something with a file, send as an attachment, copy to a new location, convert to PDF, you need to use the SharePoint 'Get file content' action, and optionally use the 'Get file metadata' to obtain the filename etc.

    The SharePoint 'Get file content' action retrieves the file which is contained within the 'File Contents' property... the file encoded as a Base 64 string.

    Example below which shows how to obtain the file:

    1.png

     

    In your example, after the Excel actions have made changes to the target file, you need to use the SharePoint 'Get File Content' action to get the file.

    HTH

    Jay

    -------------------------------------------------------------------------

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

  • ahmadbutt Profile Picture
    255 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    @Jay-Encodian I tried it with 'get file content' but I get a error. Error: file not found. As the file identifier I tried the ID of the SharePoint list and also of the Excel file. I just get the same error.

     

    Filenotfound.PNG

     

     

     

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    Hey @ahmadbutt 

    If your getting a 404 error, its because the action is not configured with the correct information.

    I think after you've updated the Excel you trying to copy to another location in SharePoint? In which case you simply need to point the 'Get file content' action at the same fail the excel actions are pointed at

    HTH

    Jay

  • ahmadbutt Profile Picture
    255 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    Hey @Jay-Encodian.

    That did not work for me. Is there something else than 'get file content? I need to save the updated Excel file in another location in SharePoint. 

     

    I used create file only and that works. I only can see the updated rows if selected, but not all the other rows if selected. The updated rows are correct but not the rows that already exist. Is there something I can do with that? The updated rows I get but not all the other rows in the file.

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.
    Hey,
    If you just need to copy a file use the SharePoint ‘Copy File’ action.
    But... using the ‘Get File Content’ and then ‘Create File’ or ‘Update File’ would also work, if they aren’t working it because your passing bad configuration data... in which case it’s likely the ‘Copy File’ action won’t work either.
    Try the copy action and it it doesn’t work please post some screen shots of the configuration of the actions.
    Cheers J
  • ahmadbutt Profile Picture
    255 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    @Jay-Encodian I think the error is from the 'File identifier' because I don't know what that is for the updated file. I tried it also with the Excel ID. The error 404, I get this from the 'get file content'

    I did this:

    exceltabel.PNG

    filecontent.PNG

    error.PNG

     

     

     

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    Hey @ahmadbutt 

    Yes, the 'Id' property and 'Identifier' property hold different values for identifying a document... the 'Id' is an int and not the path to the file.

    If you can't see the 'Identifier' value use the 'Get File Properties' action to get it:

    1.PNG

     

    HTH

    Jay

    -------------------------------------------------------------------------

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up

  • ahmadbutt Profile Picture
    255 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

     

    vanhem.PNG

     

    Above is your Flow, below mine.  

    werktniet.PNG

    @Jay-Encodian Id is the same as 'Identifier', but that doesn't work. If I use the Id of when a item is created, that works but it copy nothing...

    Yellow marked is the same, but its Dutch language. 

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    Hey @ahmadbutt 

    Why are you manually hard setting the ID to 1? this would only ever point to the first file which was added to the SharePoint library... and if that is deleted you'll get a 404.

    Jay

  • ahmadbutt Profile Picture
    255 on at
    Re: How to get the file content of a Excel file that is modified with a new row or created a new row.

    @Jay-Encodian If I use the Id of when a item is created, that works but it copy nothing... I just tried 1 to get output, but I got the 404 error. I only can select the Id of when a item is created. If I do, in the SharePoint/Teams location nothings happens. It only makes a .txt file.  
     niets.PNG

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard