Reputation: 11
I would like to create a new excel workbook from office script. Is it possible to create a new workbook and give it a dynamic name (date) in office script itself?
Upvotes: 1
Views: 5124
Reputation: 251
This is supported by using Office Scripts in combination with Power Automate. You can pass the dynamic name as a return value for the office script, and this can be used by the "Create file" Power Automate connector. Your Power Automate flow would look something like this -
The result
value is what is returned by the Office Script. This page provides details on how you can return data from Office Scripts.
The File Content
is returned by the Get File Content
action. This can be a template/blank excel file.
The flow example I have above runs another script on the newly created file. This way you can do more actions on the new file if required.
Upvotes: 5