Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Copy content from one Excel file to another template and save in a folder

Hi everybody!

I am trying to reperform a certain process with the Flow and yet have no idea if and how it can be done.

I will be very grateful if someone could give me a hint.


Process looks like this:

1. Sales manager sends approval form in Excel to Business Analyst (this form contains list of products with suggested prices)

2. Business Analyst copy the content of this form in another Excel template, where additional calculations are done (such as Gross Profit, Gross Margin etc)

3. After Calculations are performed the form is sent for approval to management

The main reason for this copy-paste job is confidential information on margin, which Sales manager should not see.


Is there any way to automatize the process?


Thank you very much!



Community Support
Community Support

Hi @koreluk,


Do you want to copy content from a Excel file attached to an email into another Excel file?

Has the data of your Excel file been formatted as a table?

Could you please share more details about your source Excel file and the template Excel file?

Further, where does your Template Excel file store?


There is no way to get the actual content of a Attachment file of an received email in Microsoft Flow currently, the Attachment content (Attachment Content dynamic content) we get is a binary data representation of the content of the Excel file. In addition, there is no way to analyze binary data in Microsoft Flow currently.


You could consider take a try with the following workaround as an alternative solution:

The Source Excel file shows as below:5.JPG

The Template Excel file shows as below:6.JPG


I assume that your Template Excel file is stored within your OneDrive for Business folder and the data of your Excel files are formatted as table, I have made a test, please take a try with the following workaround:

  • Add a "When a new email arrives" trigger, Has Attachment field and Include Attachments field both set to Yes.
  • Add a "Apply to each" action, input parameter set to Attachments dynamic content of the trigger.
  • Within "Apply to each" action, add a "Create file" action of OneDrive for Business connector, specify Folder Path, File Name set to Name dynamic content of the trigger, File Content set to Content dynamic content of the trigger.

         Add a "Get rows" action, File name set to Id dynamic content of the "Create file" action, Table name set to Table1 as a custom value.


        Add a "Apply to each 2" action, input parameter set to output of "Get rows" action. Within "Apply to each 2" action, add a "Insert row" action, File Name field set to the specific Template Excel file, Table name set to Table1. ProductName field set to following formula:


Price field set to following formula:


Amount field set to following formula:


Gross Profit field set to following formula:


Note: The Product Name, Price and Amount are columns in my Source Excel file. In addition, if there is a space within the column name, please replace the space with '_x0020_' within above formula.


Under "Apply to each 2" action, add a "Delete file" action, File field set to Id dynamic content of the "Create file" action.




Image reference:7.JPG



The flow works successfully as below:9.JPG





Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not applicable


Notice that the action in the flow was no longer can be found in Microsoft Flow. I could not find "get rows" but only "get a row" available. Could you please advise if any other action can replace "get rows"? As when I replace "get rows" with "get a row", it need to specify certain file where "get rows" no need. 

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,718)