How to Create CSV Table From Excel File Using Power Automate?

A few days ago, I was working on a Power Automate flow where I had to extract data from an Excel file and convert it into a CSV table. The client needed a way to automate the process of transforming Excel data into a CSV format.

In this tutorial, I will explain how to create a CSV table from an Excel file using Power Automate.

Create CSV Table From Excel File Using Power Automate

Suppose you have an Excel file named “SalesData.xlsx” stored in a SharePoint document library.

Microsoft Power Automate How to convert Excel to csv

This file contains a table named “Sales” with columns like “Order ID”, “Customer Name”, “Order Date”, and “Sales Amount”.

Convert Excel to CSV Using Power Automate

Now, I want to automate the process of converting this Excel table into a CSV file and send the CSV file as an attachment to an email.

Now follow the below steps to do this:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

Power Automate create csv table from excel file

2. To get the Excel data, select List rows present in a table action, then provide Location, Document Library, File, and Table in the Excel sheet.

Power Automate How to Convert Excel to CSV

3. Now, we will create a CSV table, so add the ‘Create CSV table‘ action. In the ‘From’ field, select the value from the previous step using the dynamic content. For the columns, custom.

HeaderValue
Order IDitem()?[‘Order ID’]
Customer Nameitem()?[‘Customer Name’]
Order Dateitem()?[‘Order Date’]
Sales Amountitem()?[‘Sales Amount’]
How to Convert Excel to CSV in Power Automate

4. Now, add a Send an email action to send the CSV file. To do this, add the Send an email action with the following parameters:

  • To: Enter the recipient’s email address.
  • Subject: Provide a subject for the email.
  • Body: Write the body content of the email, including any message or instructions.
  • Attachments: For the Attachment Name, enter SalesData.csv. For the attachment content, select Output from the Create CSV table action.
How do I convert Excel to CSV table in Power Automate

Now, click Save and run the flow manually. Once it runs successfully, your recipient will receive your email. After that, open the CSV file.

How to Create CSV Table From Excel File using Power Automate

I hope you follow all the steps above. In this tutorial, I explained how to create a CSV table from an Excel file using Power Automate.

Related Power Automate articles:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…