Hello,
I would like to present you with, a ready-to-use solution for small bunches of data taken from Excel Workbooks via Power Automate Cloud, where you would like to limit taken columns to one of them, without knowing the full column name. Of course, to make everything harder, Excel Workbook’s table is also given as a variable, so we can post everything in the middle of a more advanced flow, such as a huge ‘apply to each’.
But, for the beginning, let’s describe more clearer our objectives for this thread:
- Ready to re-create as a scope in bigger flow, smaller flow.
- Listing rows from a table in Excel, which name’s is stored as a variable.
- We would like to limit our output to single column array;
- We don’t know full name of column, so we want to use contains expression.
- As an output, we would like to have an array from this one column, for further operations.
Now, we can go with our flow creation:
Simple instant flow type, taken for my requirements:
Then, list rows from your table that name you can provide in variable
split(string(first(outputs('List_rows_present_in_a_table')?['body/value'])),'",')
split(replace(replace(replace(item(), '"', ''), '}', ''), '{', ''), ':')[0]
body('Select')
item() contains string('your variable')
item()
outputs('List_rows_present_in_a_table')?['body/value']
{
"value": @{item()?[outputs('Compose')]}
}
Feel free to correct me in the comments section, I will update this flow description accordingly if required to have ready to use solution.
Leave a comment