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 / Export SharePoint list...
Power Automate
Suggested Answer

Export SharePoint list to Excel .xlsx format and save to SharePoint

(0) ShareShare
ReportReport
Posted on by 244
***PLEASE can someone help me?!***
 
Hi all,

I have been trying to build this flow for weeks now, and I'm losing my mind. I have followed every single YouTube video and article I can find, but nothing is working.

All I am trying to do is set up a daily backup of a SharePoint list to an Excel .xlsx file and save to SharePoint. I have successfully set this up to save as a .csv file, but I cannot seem to get it to work for an .xlsx file. It is maddening!

Can someone please help me? Specific steps/instructions would be greatly appreciated. I have managed to get one to work up until adding the rows into the table - it gives me an overlap table error, but I don't know why? I have attached a screenshot of the working .csv flow.

Thank you!
Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi
     
    So you want to save the sharepoint list items that are created every day into an excel file - correct ?
     
     
  • axray Profile Picture
    244 on at
    @Nived Nambiar - yes, a new .xlsx file each day (I have the naming convention set up with the formatted date) saved to a SharePoint site - these are the existing steps I have, but the last step after Create table never works (I've tried several variations - basically it would be to add rows, applied to each):

  • axray Profile Picture
    244 on at
    Can anyone please help?
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @axray
     
    Sorry, actually there were some issues with the Power platform forum by which i wasn't able to post answer for this.
     
    I have checked and it seems like based on error - i could see that it happens due to already table present in excel before creating a new table - is it right ?
     
    I assume while creating the excel file - you have used the content from following compose action in the content field of create file 
     
     
    and this contains base64 format of excel file with empty table - correct ?
     
    Thanks & Regards,
    Nived N
  • axray Profile Picture
    244 on at
    @Nived_Nambiar - yes, I have tried setting the flow up by using the existing document's blank table and with not using it at all - I get (different) errors either way... either duplicate table error or I can't even open the .xlsx file after it is created.
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi
     
    I have tried the following approach and it worked :)
     
    I have a sharepoint list as shown below
     
     
    Also I have created a excel file with table created with the columns which i required to capture from sharepoint list as shown below, This file act as template file
     
    before designing the actual flow- use get file content action to read template file content and store the content so obtained in compose action so that we can use content data to generate an excel file with empty tables and columns defined.
     
    1. As seen in below flow - i have stored the file content of above template file so obtained in compose action like below
     
     
    2. Now use the Create file action to create the excel using above content for storing backupdata for today (if flow is scheduled to run daily) as shown below
     
    File name is like in below format which includes date as well like below
    concat('SharepointBackup_',formatDateTime(utcNow(),'yyyyMMdd'),'.xlsx')
     
     
    3. Now use get items action to get sharepoint list items
     
    4. use get tables to get details of table details in created file action as shown below
     
    5. Now use apply to each loop to loop through each list item- next steps will be added in this loop
    Use add row to table action to add row to table as shown below
     
     
    Expression to find table by id
     
    Expression : 
    first(outputs('Get_tables')?['body/value'])?['id']
     
    Now add the details to table in JSON format, note that json key name should match the name of column in excel tables and values/dynamic content should be taken from get items action output :)
     
     
    Hope it helps !
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • axray Profile Picture
    244 on at
    @Nived_Nambiar - can you please explain these in more detail?
     
    "before designing the actual flow- use get file content action to read template file content and store the content so obtained in compose action so that we can use content data to generate an excel file with empty tables and columns defined.
     
    1. As seen in below flow - i have stored the file content of above template file so obtained in compose action like below"
     
    How do I set up the first/base file? Is it OK to just use an .xlsx file or does it need to be an .xltx template file?
     
    How do you get the Compose Inputs stuff you put in there?
     
    Thank you!
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @axray
     
    So when i said to use get file content , read the template file and use the content in a compose action, what have to be done is,
     
    1. Create a template excel having excel table with columns something like below (blank table with no rows)
     
    2. Now use get file content to read the above excel file and capture the file content like below
     
     
    This file content is the one which you have to use in compose action of the flow which i have explained earlier.
     
     
     
    Hope this helps !
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • axray Profile Picture
    244 on at
    @Nived_Nambiar I built it as you outlined, but it still bottoms out on the last step (apply to each / add a row into a table). This is so frustrating!
     
     
    **************
     
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @axray
     
    I think you have used square brackets [] in the row field of add row to table as per your flow design 
     
     
    You should have used curly brackets instead {} - Refer the screenshot (from my answer)
     
     
     
    Hope it helps !

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. 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

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard