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

Microsoft Flow and Excel

Hello!

I have some questions abou Microsoft flow and Excel.

 

Is it possible for an excel file to be created when a new item is created in a sharepoint list?

 

Is it possible for flow to copy informtion from say 3 columns in a SharePoint list and then copy this to say 3 columns on the Excel file?

 

Is it possible if say there are 3 items created, flow to copy say 3 columns of info for each items created on a list and then add this to say 3 columns with 3 different rows for the new items on One Excel file or separate excel files for each item?

 

Sorry if this is confusing I can elaborate.

 

Edit* We are looking to use Powershell to automate something that uses an Excel file but might work for a sharepoint list too..

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Microsoft Flow and Excel

Hi @tested1,

 

About #1, do you want to create a file when an item is created in a SharePoint list? Please try if the following way will work for you.

1.PNG

About #2, do you want to extract only 3 columns from a list then insert these 3 columns into an Excel file? Please check the following flow which is using a Select action to select 3 needed columns from the list.

After action Get items, add the action Select, map the three columns with what you want. Then add an Apply to each and select value from the Select output, in the action Insert row, use the following code for each column:

 

name: item()?[‘title’]

number: item()?[‘number’]

date: item()?[‘date’]

 

Note: please use the key you specified in the Select.

2.PNG

About #3, do you want to get the last 3 items from the list?

Get items from the list, then input the following code in the action Compose 2 which will return the last three items:

skip(body('Get_items')?['value'],sub(length(body('Get_items')?['value']),3))

Add Compose action with code as below to get the first item within the last three:

first(outputs('Compose_2'))?['Title']

Add Compose 3 with the following code to get the second item within the last three:

 

first(skip(outputs('Compose_2'),1))?['Title']

 

Add Compose 4 with this code to get the last item within the last three:

last(outputs('Compose_2'))?['Title']

 3.PNG

Please feel free post back if you need more help.

 

Best regards,

Mabel

 

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

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Microsoft Flow and Excel

Hi @tested1,

 

About #1, do you want to create a file when an item is created in a SharePoint list? Please try if the following way will work for you.

1.PNG

About #2, do you want to extract only 3 columns from a list then insert these 3 columns into an Excel file? Please check the following flow which is using a Select action to select 3 needed columns from the list.

After action Get items, add the action Select, map the three columns with what you want. Then add an Apply to each and select value from the Select output, in the action Insert row, use the following code for each column:

 

name: item()?[‘title’]

number: item()?[‘number’]

date: item()?[‘date’]

 

Note: please use the key you specified in the Select.

2.PNG

About #3, do you want to get the last 3 items from the list?

Get items from the list, then input the following code in the action Compose 2 which will return the last three items:

skip(body('Get_items')?['value'],sub(length(body('Get_items')?['value']),3))

Add Compose action with code as below to get the first item within the last three:

first(outputs('Compose_2'))?['Title']

Add Compose 3 with the following code to get the second item within the last three:

 

first(skip(outputs('Compose_2'),1))?['Title']

 

Add Compose 4 with this code to get the last item within the last three:

last(outputs('Compose_2'))?['Title']

 3.PNG

Please feel free post back if you need more help.

 

Best regards,

Mabel

 

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

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,897)