- Published on
How to automatically extract list items and add them to an Excel using Power Automate
- Authors
- Name
- Nicolas Kheirallah
A simple Power Automate job I did for a client who wanted all the lists created wthin a month emailed to her as an Excel, So this is how I did it: First visit Power Automate:
Press Create
Choose when the script will run, I choose once a month.
- Create two variables: Name: FirstofPreviousMonth Type: String:
addDays(startOfMonth(addDays(startOfMonth(utcNow()),-1)),1)
Name: LastofPreviousMonth Type: String: addDays(startOfMonth(utcNow()),-1)
- Create a new connector - SharePoint Get List items
Site: YourSite List: yourlist Filter query:ParkingDate ge'@{variables('FirstOfLastMonth')}' and ParkingDate le '@{variables('LastOfLastMonth')}'
- Search after "Create HTML Table":
From: Value from SharePoint Get List items
Header: Header for excel Value: The value from the SharePoint list
- Search after the Sharepoint Connector and choose to Create file: Site Adress: Choose where you want to save your file Folder Path: What is the path for the file File Name: Filename + .xls File Output: Output from Create HTML Table