In this Power Automate tutorial, we will discuss Power Automate create table with a few examples. And also we will discuss the below points:
- Power Automate create table in excel
- Power Automate create table from array
- Power Automate create html table from filter array
- Power Automate create table in specific worksheet
- Power Automate create table column names
- Power Automate create table dynamic range
- Power Automate create html table formatting
- Power Automate create table from JSON
- Power Automate create html table from forms
- Power Automate create table from attachment
Power Automte create table in excel
Here we will see how to create the table in excel using Power Automate.
So I have an excel template called Product, which contains a certain range of content, that looks like a table but not a table, so basically we will refer to the data or content inside MS Flow and we will create an actual table in excel.
Before we start the flow, make sure you have saved this excel template in the SharePoint library or OneDrive for business.
Now let’s create a flow that will create a table in excel using Microsoft Flow
In Power Automate, select the Manually triggered Flow then click on the Next step.
Now to create a table in an excel file, select Create table -Excel Online Business action. Then Provide the Location, and Document library where you have saved the file. Choose the File from the Folder.
Now in the Table range, first we will provide the Sheet name i.e. Product, Column 1 which is A1, and then provide the last cell range E6, so our table range is Product!A1:E6.
At last, provide a table name and no need to provide a column name, if you provide the column name it will be overwritten with the existing column name.
Now click on Save and run the flow manually, you can see the table get created in Excel.
This is an example of Power Automate create a table in excel.
Read How to get days of month in Power Automate
Power Automate create html table from array
Here we will see how to create an Html table from an array using Power Automate or Microsoft Flow.
So in this example, we will use the below array to create an HTML table using Power Automate or Microsoft Flow.
[
{
"Name": "Alex",
"Age": 28,
"Department": "Finance"
},
{
"Name": "Michel",
"Age": 38,
"Department": "Development"
},
{
"Name": "Celia",
"Age": 30,
"Department": "Testing"
},
{
"Name": "Ruby",
"Age": 32,
"Department": "Finance"
}
]
In Power Automate, select the Manually triggered Flow, then click on the Next step.
Select Initialize variable action, then provide the variable name, type as Array, and in value write the above array.
Now click on the Next step and select Parse JSON action, then provide the variable in the Content and in Generate from sample provide the above array. So you will get the below schema.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Age": {
"type": "integer"
},
"Department": {
"type": "string"
}
},
"required": [
"Name",
"Age",
"Department"
]
}
}
Now we will map the header with values to create an HTML table, so, click on the Next step and select Select action. Then provide the body of Parse JSON and Map the header with the value.
Now we will create an Html table, so click on the Next step and select Create Html table action, then provide the output of Select in the From field.
Now click on Save and run the flow manually, you can see the HTML table.
This is an example of Power Automate create an HTML table from an array.
Read How to convert word to pdf using Power Automate
Power Automte create html table from filter array
Here we will see how to create an Html table from a Filter array using Power Automate.
I have an Excel File, in an excel file, there is two excel sheet, in one sheet we have product data, and in another sheet we have a column of product category. So here we will fetch the data category are similar in both sheets.
Product sheet in excel file
Category sheet
In Power Automate, select the Manually triggered Flow, then click on the Next step.
Now we will retrieve data from the first table, so click on the Next step and select List rows present in a table action. Then provide the Location, Document Library, File, and table of excel.
Next, we will retrieve the category column from the second table, so click on the Next step, select List rows present in a table action, then provide the Location, Document Library, File, and Table of excel.
Now we will filter the First table based on the category column, so click on the Next step and select Filter array action. Then provide the field value
- From- value from List rows present in a table
- Value- category from List rows present in a table
- Operator- is equal to
- Value- category from List rows present in a table 2, that will automatically add Apply to each action.
Now we will map the column with a value, which will create an HTML table, so click on Add an action inside Apply to each action, then select Select action. Then provide the body of filter array in From and wich to the text and write the below JSON
{
"Product name": "@item()?['Product name']",
"Category": "@item()?['Category']",
"Unit Price": "@item()?['Unit Price']"
}
Now we will create an Html table, so click on Add an action, select Create Html table action, the provide the output of Select.
Now click on Save and run the flow manually, and you can see the table for each category.
This is an example of Power Automate create an HTML table from a filter array.
Power Automate create table in specific worksheet
Here we will see how to create a worksheet in excel, then on that specific worksheet, we will create the table.
I have an excel file called Product which I have stored in a SharePoint library.
In Power Automate, select the Manually triggered Folw, then click on the Next step.
Now we create a worksheet in the excel file, so click on the next step, and select Create Worksheet action, then provide the Location, Document Library, File, and Name of the worksheet.
Now we will create a table in the above worksheet, in this table, we will create 3 columns, so click on the Next step and select Create table action. Then provide the location, Document library, and excel file.
Next, provide the table range of 3 columns, so the notation is Customer!A1:C1, provide the table name and column name separated with semicolon.
Now click on the Save and run the flow you can see a worksheet create with table in the excel file.
This is an example of Power Automate create table in specific worksheet.
Read Power Automate export SharePoint list to excel and send an email
Power Automate create table column names
Here we will see how to create tables with column names using Power Automate or Microsoft Flow.
I have an excel file called Product, which contains a worksheet called Region. In this worksheet, we will create a table with columns for Address, Region, city, country, and Pincode.
In Power Automate, select the Manually triggered Flow, then click on the Next step.
Now we will create a table with columns in an excel worksheet, so click on the Next step and select Create table action.
Then provide the location and Document library where the file is saved, choose the file from the folder. In table range, we will create 5 columns in the Region worksheet, so the notation is Region!A1:E1. Next, provide the table name and then provide the column name with semicolon-separated.
Now click on Save and run the Flow manually, and you can see the table get created with columns.
This is an example of Power Automate create table column names.
Read Power Automate delete all items in SharePoint list
Power Automte create table dynamic range
Here we will see how to create a table with a dynamic range column and column Name using Power Automate or Microsoft Flow.
I have an excel file, that contains a worksheet called customer. So in this worksheet, we will create a table, column, and column name dynamically.
In Power Automate, select the Manually triggered Flow, then click on the Next step.
Next, we will initialize the array variable that contains the sample array, from this array we will extract the key-value pair and create the table in excel.
So select Initialize variable action, then provide the var name, type as an array, and in value provide the below array.
[
{
"Name": "Alex",
"Age": 28,
"Department": "Finance"
},
{
"Name": "Michel",
"Age": 38,
"Department": "Development"
},
{
"Name": "Celia",
"Age": 30,
"Department": "Testing"
},
{
"Name": "Ruby",
"Age": 32,
"Department": "Finance"
}
]
To get the key-value pair from the variable we will use parse JSON, so click on the Next step and select Parse JSON action. Then provide the variable in the from field and generate the schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Age": {
"type": "integer"
},
"Department": {
"type": "string"
}
},
"required": [
"Name",
"Age",
"Department"
]
}
}
Now we will map the value with custom columns, so click on the Next step and select Select action. then provide the body of parse JSON, and map the value with columns.
Now we will get the column Name and value, so click on the Next step and select create CSV table. Then in From write the below expression inside the square bracket.
first(body('Select'))
In this step, we will extract the column name from the above CSV table so click on the Next step and select Compose Action. Then in Input write the below expression:
split(first(split(body('Create_CSV_table'),decodeUriComponent('%0D%0A'))),',')
Now we will write the expression to create a dynamic range of columns, so click on the Next step and select Compose action. Then in Input write the below expression
split('A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z',',')
Now we will create a table in the worksheet, so click on the next step and select Create table action. Then provide the Location, Document Library, and choose the file.
Next, in table range, provide the worksheet name i.e. Customer, then starting column notation i.e A1, and then based on the column require it will create dynamically, so for this write the below expression with 1.
outputs('A1_Notation_Mapping')[sub(length(outputs('Array_of_col')),1)]
Then provide the table name and to create column name dynamically provide the below expression:
first(split(body('Create_CSV_table'),decodeUriComponent('%0D%0A')))
Now click on Save and run the flow manually, you can see the table and column with column name dynamically created.
This an example of Power Automate create table dynamic range.
Read The specified object was not found in the store Power Automate
Power Automate create HTML table formatting
Here we will see how to format the Html table with CSS using Microsoft Flow.
So here we will use the Project Management list to create an Html table.
In Power Automate, select the Manually triggered flow, then click on the Next step.
Now we will get items from the SharePoint list, so click on the Next step and select Get items action, then provide the site address, and list name.
Now we will create an Html table, so click on the Next step and select Create Html table action. Then provide value from dynamic content, then click on Show advanced options and change Automatic to customs.
Now we will format the above HTML table with CSS code, so click on the Next step and select Compose action, then provide the below CSS code with create Html table output.
<style>
Table {
font-family: Arial, Helvetica, sans-serif;
background-color: #EEEEEE;
border-collapse: collapse;
width: 100%;
}
Table td, Table th {
border: 1px solid #ddd;
padding: 3px 3px;
}
Table th {
font-size: 15px;
font-weight: bold;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #1C6EA4;
color: white;
}
</style>
Now we will send an email to the above Html table, so click on the next step and select Send an email(V2) action. Then provide the To, subject and in the body add the output.
Now click on Save and run the flow manually and you can see the Html table formatted.
This is an example of Power Automate create HTML table formatting.
Read How to get email address from name in Power Automate
Power Automte create table from JSON
Here we will see how to create a table from JSON using Power Automate
As, In SharePoint Online, I have an excel file, in which we will create a table, and add rows to the table using Power Automate.
In Power Automate, select the Manually triggered Flow, then click on the Next step.
Now we will initialize the array variable with sample array value, select the initialize variable action. Then provide the variable name, type as Array, and in value add the below array
[
{
"Name": "Alex",
"Age": 28,
"Department": "Finance"
},
{
"Name": "Michel",
"Age": 38,
"Department": "Development"
},
{
"Name": "Celia",
"Age": 30,
"Department": "Testing"
},
{
"Name": "Ruby",
"Age": 32,
"Department": "Finance"
}
]
Now we will use the Parse the above to get the JSON, so click on the Next step and select Parse JSON action. Then provide the array in the content and generate a schema from the sample array.
Now we will create a table in an excel file, so click on the Next step and select Create table action. Then provide the location, Document library, and File, Table range is $A1:$C1 as we have the column, and provide the Table name.
Now we will add data to the table, so click on the Next step and select Apply to each action. Then provide the Body of Parse JSON action.
Then click on Add an action, and select Compose action. Then in input map the column with value.
Next click on Add an action, select Add a row into a table, next provide the Location, Document Library, File, and select the table from the dynamic content. In Row select the output of the compose from the dynamic content.
Now click on Save and run the Flow manually you can see the table with data in excel sheet.
This is an example of Power Automate create table from JSON.
Read Power Automate copy files with Examples
Power Automte create html table from forms
Here we will see how to create an Html table using Microsoft Forms using Power Automate.
Here I have a Microsoft Form is called the Training Feedback form, from this form we create an HTML table.
In Power Automate, select the trigger ‘When a new response is submitted‘ action. Then provide the Form id from the option
Next, we will get response details, so click on the Next step and select the ‘Get response details‘ action. Then provide the Form id and response id from the dynamic content.
Next initialize array variable, which we will use later to append the response, so click on the Next step and select Initialize variable action. Then provide the variable name, type as an array.
Next, we will append the response to the array variable, so click on the Next step and select Append to array variable action, Then select the variable and in values map the value with properties like below to create an array.
Now we will create an Html table, so click on the Next step and select Create Html table action. Then provide the varArray in the Form field.
Now click on Save and run the Flow Manually, you can see the Html table, once you respond to the form.
This is an example of Power Automate creating HTML table from forms.
Read Microsoft Flow or Power Automate employee onboarding
Power Automate create table from attachment
Here we will see how to create a table in Excel from an attachment using Power Automate.
I have an excel file that only contains data which we will send with an attachment via outlook.
In Power Automate, select the trigger ‘When a New email arrives‘ action. Then provide the folder in outlook and click on Show advanced options, then in Only with attachment field select Yes from the option.
Next, we will get an attachment, so click on the Next step and Get attachments (V2) action. Then provide the Message-id, and Attachment id, which will automatically add Apply to each action.
Now we will create a file in SharePoint, so click on the Next step and select Create file action, then provide the site address, folder path, file name, and file content bytes.
Next, get the file properties, so click on the Next step and select Get File properties action inside Apply to each. Then provide the site address, Contract, and id from the dynamic content.
Now we will create a table in an excel attachment, so click on the Next step and select Create table action, then provide the Location, Document Library, File, and Table range $A1:$C5.
Now send an email with an attachment to run the flow, and you can see the table is created in an excel file.
This is an example of Power Automate create table from attachment.
Related Power Automate tutorials:
- Convert SharePoint list item to PDF using Flow or Power Automate
- Power Automate Create a CSV Table
- How to update SharePoint Multiselect column in Power Automate
- Power Automate Create File
- How to create a word document from a template in Power Automate
- Power Automate Replace + 21 Examples
In this Power Automate tutorial, we learned how to create a table in Power Automate and also we learned the below examples:
- Power Automate create table in excel
- How to create table from array Power Automate
- Power Automate create html table from filter array
- How to create table in specific worksheet in Power Automate
- Power Automate create table column names
- Power Automate create table dynamic range
- Power Automate create html table formatting
- How to create table from JSON in Power Automate
- Power Automate create html table from forms
- Power Automate create table from attachment
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.
Hello,
How I can get power automate to look for the latest file created in Onedrive in the {File Name Field} rather than specifying the file name as all the file names are dynamic
This is very informative and really helpful. Thank you so much
Hi Bijay,
Can you give a hint how can I rename an excel sheet in power automate. There is no action available for this. many thanks