cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Regular Visitor

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. 

Highlighted
Helper V
Helper V

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,969)