Hello Everybody,
Below is the scenario which I am trying to create a flow and got stuck up in it.
When a file is created in one drive in a path -> Get rows from the created excel file -> Insert that rows into destination excel file in One Drive for business in another path
This is my flow.
FLow
When I run the flow, it is successful but rows are not getting updated in destination file.
My questions are:
1. I am not sure of how to map the columns between source and destination files.
2. In Get rows action, how can I restrict to read only the rows with data. Here it reads the entire table even without data in it.
Flow Output
Source & Destination file
Highly appreciate any help on this. Thanks in advance.
Solved! Go to Solution.
Hi @Kani,
Do you want to insert rows of one file to corresponding columns of another file?
For your first question, you could use an expression to map the columns between source and destination files.
For your second question, you could add a “Filter array” action to filter the rows with data.
Please take a try with the following workaround:
@and(not(empty(item()?['Col1'])),not(empty(item()?['Col2'])),not(empty(item()?['Col3'])) )
Image reference:
The flow works successfully as below:
Best regards,
Kris
Hi @Kani,
Please take a try with the following steps:
item()?['Col1']
Image reference:
Best regards,
Kris
Hi @Kani,
Do you want to insert rows of one file to corresponding columns of another file?
For your first question, you could use an expression to map the columns between source and destination files.
For your second question, you could add a “Filter array” action to filter the rows with data.
Please take a try with the following workaround:
@and(not(empty(item()?['Col1'])),not(empty(item()?['Col2'])),not(empty(item()?['Col3'])) )
Image reference:
The flow works successfully as below:
Best regards,
Kris
Thanks so much for your reply.
Half of the flow is working fine now. But still I didn’t get the expected output. Still see problem in the insert row action.
Have tried with two ways.
After flow run the Output is as below. Entire values got inserted in each column.
2. Directly typed the value @item(‘Col1’) in the respective columns in Insert Row action
After flow run the Output is as below.
My expected output is something like below.
Sorry if i have understood your solution wrongly. Please shed some more light on fixing Insert row action to get the desired output.
Thanks
Hi @Kani,
Please take a try with the following steps:
item()?['Col1']
Image reference:
Best regards,
Kris
Thanks a lot for the detailed steps. It worked fine now.
Kris, I'm trying to solve a problem somewhat similar to that of the Subject matter. The difference is that, after using a Flow to get the contents of a row from an Excel spreadsheet (on a OneDrive), I'd like to pass the values to a Pwr App app as opposed to inserting them into the Excel file.
Note: I've been able to update my Excel spreadsheet from my app using a flow so I know that the connection to the spreadsheet on the OneDrive is working and that my app is, for that function, working as well. Right now it is a simple test Excel spreadsheet with 4 columns (plus the Rowid column) with 12 rows and a header.
Your help would be greatly appreciated. Your instructions on the subject matter referenced were extremely clear and easy to understand.
Cheers,
Bob G.
Is this possible on using the Excel Online (Business) connector? I have files in a sharepoint location and the result keeps being
{ "status": 400, "message": "The expression \"drives('...XXXX...')/items/Path/To/File.xlsx\" is not valid.\r\nclientRequestId: ..XXX-XX..", "source": "excelonline-ne.azconn-ne.p.azurewebsites.net" }
I have tried to use this connector with runtime variables before without success, because of a known limitation where the parameters could only be set at designtime. I hoped they fixed this limitation as I saw this post, but your solution only works with the Excel Online (OneDrive) connector and not the Excel Online(Business)?
help i cant find the Excel connector and the Excel- Get rows in microsoft flow Action
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.