cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

New Item in SP list connected to a file

Hi there,

 

Quite new to the flows idea, absolutely love it, but the ideas I have are way above my knowledge!

 

So I have an SP list and would like to create a flow which would copy a template file (can be either Excel or Word, but I doubt the latter would allow the kind of sync I have in mind) and get some data transferred from my list to the relevant fields within the newly-created file.

 

I have gotten as far as creating a flow copying my template file and giving it the name I want, triggered by a new entry in my SP list. I have no idea though how I can transfer the data from my list to that new file? E.g. I would need the data in column ID to get added into cell A1 in my newly-created Excel document.

 

Any help much appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

I would recommend using Office Scripts, specifically Office Scripts with Power Automate. This is the 'Run Script' action on the Excel connector. With Office Scripts you can use the 'Run Script' action to execute javascript against a workbook. The other actions in the Excel connector really only deal with table manipulation. With Office Scripts, you can manipulate essentially anything in the workbook in any way you want. Even if you don't have experience coding, Office Scripts can help generate a script by recording your actions via the Action Recorder.

 

Here's a very basic script that will do what you want.

function main(workbook: ExcelScript.Workbook, param: string) {
  workbook.getFirstWorksheet().getRange("A1").setValue(param);
}

 

View solution in original post

1 REPLY 1
Microsoft
Microsoft

I would recommend using Office Scripts, specifically Office Scripts with Power Automate. This is the 'Run Script' action on the Excel connector. With Office Scripts you can use the 'Run Script' action to execute javascript against a workbook. The other actions in the Excel connector really only deal with table manipulation. With Office Scripts, you can manipulate essentially anything in the workbook in any way you want. Even if you don't have experience coding, Office Scripts can help generate a script by recording your actions via the Action Recorder.

 

Here's a very basic script that will do what you want.

function main(workbook: ExcelScript.Workbook, param: string) {
  workbook.getFirstWorksheet().getRange("A1").setValue(param);
}

 

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (17,230)