Fill Excel using Power Automate and Office Script
Image Source:
Dec 14, 2022 7:00 AM

Fill Excel using Power Automate and Office Script

External Blog Post

In this blog post you will learn how to fill an excel file with data from Dataverse using Office Script and Power Automate.

Let me remind you of the given scenario.

Let’s assume AB Company is using Dynamics 365 for Marketing and manages events within this module. The handling of Dynamics is centralized and not every event Organizer has access to the system.

Since it is crucial for the event Organizers to have a correct list of persons that have registered (and therefore will participate) one must send this information to the Organizer.

Office Script is basically a TypeScript snipped which can be run against any Excel file. There are some specific functions one can use, which makes Office Script technically a superset of TypeScript.

Our flow will execute the following steps whenever it is executed.

  • Load the content of our template file
  • Load Event Name
  • Create a file in SharePoint with the content of the template file
  • Load all Event Registrations
  • Generate an array with all the event registrations
  • Run the script and pass in the array
  • Get the content of the file
  • Send an email with the file as an attachment

Open full article