Power Automate: create an excel file in sharepoint

First, it is not possible to create a new excel file with Power Automate without using an existing data. I mean, the new excel file must have a sheet that includes a table with columns and to get the column names to be used in Power Automate, I need a source, for instance, a sharepoint library, another excel file, etc.

For my article, I created a template excel file called “template.xlsx” that contains this table:

power automate

So my Power Automate flow will create a new file based on this template and put it in this empty folder:

power automate

I will start with the “instant cloud flow”:

power automate

NOTE: to automate it, I will use “automated cloud flow” or “schedule cloud flow”

Click on the “+” to add a new action:

power automate

In the “search” field, put “sharepoint get file” to select this option:

power automate

Fill the fields and in the “file identifier” one, select my template file:

power automate

Click on the “+” then in the “search” field, put “sharepoint get file properties” to select this option:

power automate

Fill the fields and in the “id” one, click on the “lightning” icon to select:

power automate power automate power automate

Click on the “+” then in the “search” field, put “sharepoint get file content” to select this option:

power automate

Fill the fields and in the “file identifier” one, select my template file again:

power automate

Click on the “+” then in the “search” field, put “sharepoint create file” to select this option:

power automate

Fill the fields and:

  • In the “file name” one, put manually the name of the new file including its extension
  • In the “file content” one, click on the “lightning” icon to select:
    power automate
power automate

Once done, click on “save” then on “test”:

power automate

This is the result:

power automate

Now if I want to include date, for instance the month and the year, in the file name, I will need to add those 2 actions:

power automate

To know how, read Power Automate: date and time.

Then in the “create file -> file name”, I will add the output from my “initialize variable” (testmonthyear) just before the dot (.xlsx) by using the “lightning” icon:

power automate power automate

This is the result:

power automate

Interesting Topics