cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Owl_No
Level: Powered On

How to auto-fill Excel sheet with a .csv file that's received as an attachment?

Hi MS Flowers,

 

This is my desired situation:

1. Receive .csv file as an attachment in Outlook > auto-upload this file to OneDrive for Business / SharePoint

2. Then, the content of the same .csv file should be auto-filled within an existing Excel sheet in the cloud

 

I managed the following:

1. Auto-upload attachments to the cloud

2. Get Rows from Excel file 1 > Insert Rows into Excel file 2.

However, these 2 Excel files already existed in the cloud. 

 

Could anyone tell me if my desired situation is possible? And if so, how?

 

 

Regards

3 REPLIES 3
Super User
Super User

Re: How to auto-fill Excel sheet with a .csv file that's received as an attachment?

Hi,

 

Flow can read the CSV file content as one operation not as line by line. 

 

Assume in your case you need to read each line of your CSV file and insert to another existing excel sheet as each new rows.

 

So what you need is first of all convert your CSV file to JSON format using flow. Once you converted the file to JSON then you can read the contents by each line. Create a loop and insert the line contens in each row of the excel sheeet.

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Owl_No
Level: Powered On

Re: How to auto-fill Excel sheet with a .csv file that's received as an attachment?

Thanks for the information.

 

What Flow do I use to convert the .csv file attachment to JSON? Keep in mind that the attachments can have a random name everytime. 

Super User
Super User

Re: How to auto-fill Excel sheet with a .csv file that's received as an attachment?

You can use Parse CSV action from Plumsail Documents connector. It allows you to convert CSV into an array and variables for each column. Please read this article demonstrating how it works.

 

In your case you will need to parse your CSV into an array using this action, then you can use Create XLSX document from template action from the same connector to generate an XLSX file. Please read this article describing how to work with XLSX templates.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,103)