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 / How to automate Export...
Power Automate
Unanswered

How to automate Export to Excel for a SharePoint list using flow and send an email with attachment

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am looking to create a flow which can run every monday using recurrence and then export a list to excel, once exported, send an email with this excel file as an attachment, is this possible to automate?

 

Thanks in advance.

Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at

    Yes, what you are seeking to do is possible, and the Flow would look something like this: ListToExcelToEmail.PNG

    In the Recurrence you could set it to run weekly. In the Get items you call the SharePoint List, and the Create table points to an existing Excel file. You'd then use the Send an email (V2) to send the email with the spreadsheet attached.

    If you'd like the Excel file to be empty, you can add a Get tables step, and a Delete tables step, to first clear the spreadsheet before adding the new table. 

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • v-yamao-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    I am afraid that it might be not possible to export a SharePoint list to Excel using Flow.

     

    I have figured a workaround for your reference.

     

    I the following scenario, I am going to generate an HTML table, then create a word document in OneDrive for Business, then send an email with the word document as an attachment.

     

    The function used in the Compose action is to generate a border around the items:

    replace(body('Create_HTML_table'),'<table>','<table border="1">')

    1.PNG2.PNG

     

     

    Best regards,

    Mabel

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks Mabel @v-yamao-msft , I will try this out.

    Is it possible to use Create a file in SharePoint instead rather than OneDrive?

  • Community Power Platform Member Profile Picture
    on at

    @v-yamao-msft  Hi, I am only able to make this work for .doc files. Looks like it does not work with the .xls or .xlsx extension at all.

  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi @Anonymous ï¼Œ

     

    As you mentioned, .xls or .xlsx are not available.

     

    It is possible to Create file in SharePoint library instead of OneDrive.

     

    Besides, you could also try with action Create csv table. Then create a csv file in the SharePoint library likes below.

    1.PNG

     

    Best regards,

    Mabel

     

  • vsolanon Profile Picture
    146 on at

    Hi @Anonymous ,

    I was wondering if you were able to find a solution for this. I am currently looking for the same approach.

     

    Thank you in advance!

    Veronica

  • Community Power Platform Member Profile Picture
    on at

    @vsolanon please review the accepted answer, currently CSV is supported on the flow side. Give it a try and let me know in case of issues.

  • Community Power Platform Member Profile Picture
    on at

    Hi! Thanks for this answer. It was very useful, but I Have a question about it: When I Open the .CSV file in Excel it brings a lot of data delimited with ",". When I tabulate the columns all the data are disorganized. It seems to came with the data field some sort of URL for each data input. Am I doing something wrong? Is the a way to edit the format?

     

    I Can´t add a photo with this because the file contains an URL.

     
     
     
  • Community Power Platform Member Profile Picture
    on at

    Maybe the information in this question and answer chain is outdated, but I used the instructions at https://flow.microsoft.com/en-us/blog/automate-sending-weekly-reports/ to get data from a list, created a spreadsheet file, save spreadsheet to a SharePoint library, send an email to the designated email addresses with the spreadsheet attached to it, and to do all of this on a regularly reoccurring schedule.  The link provides instructions on how to create the spreadsheet file in OneDrive, but I was able to easily adapt it to SharePoint by switching out all of the OneDrive locations to SharePoint locations.

  • Community Power Platform Member Profile Picture
    on at

    Hello.  This works except that when people try to open the spreadsheet from the email, there is an error message:

     

    Message Rec'd When Opening Created SpreadsheetMessage Rec'd When Opening Created Spreadsheet 

    If I click "Yes" the spreadsheet does open.  Also, all the spreadsheets created through this flow will not open within SharePoint, I have to download them to the Excel App to view them.

     

    Is there something more I can do to clean up the results of this flow?  Thanks.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard