Power Automate Office Scripts Basics: Difference between revisions

From Training Material
Jump to navigation Jump to search
mNo edit summary
Line 61: Line 61:
* More here (connector docs)
* More here (connector docs)
** <small>https://learn.microsoft.com/en-us/connectors/excelonlinebusiness/</small>
** <small>https://learn.microsoft.com/en-us/connectors/excelonlinebusiness/</small>
* by default stored on our OneDrive (''Documents/Office Scripts'' folder)
** can be shared with a file by clicking '''Share''' (same menu as adding a button)
** this attaches the script to the file, so anyone with the file can run the script
** unfortunately shared scripts can not be called by ''Power Automate''
*** it can only call scripts stored on the connected OneDrive account
[[File:TriggeringScr.png]]
[[File:TriggeringScr.png]]
== IntelliSense ==
== IntelliSense ==
== Variables, Types and Interfaces ==
== Variables, Types and Interfaces ==

Revision as of 16:18, 11 December 2024


title
Power Automate Office Scripts Basics
author
Lukasz Sokolowski


Power Automate Office Scripts Basics

Power Automate Office Scripts Basics Training Materials

Introduction

Single module context

  • Accessing Scripts
  • Triggering Scripts in Power Automate
  • IntelliSense
  • Variables, Types and Interfaces
  • Get & Set
  • Basic Excel Actions
  • If
  • Loop
  • Send and Return Data
  • Additional functions

Intro Con't

Office Scripts

Accessing Scripts

In Excel online (Business version only)

  • an Automate tab in the ribbon bar
  • the Ribbon allows to record actions (just like vba)
    • Create a blank New Script
    • Open existing Scripts
    • and Automate a Task with a Power Automate template
  • The Record function
    • does not record every action
    • uses selections instead of references
    • does show good notes and is a good way to learn

AccessingScr.png

// comment
let a: string = 'code'

Triggering Scripts in Power Automate

Office Scripts

  • can be run by adding the Run script action under Excel Online (Business)
  • More here (connector docs)
  • by default stored on our OneDrive (Documents/Office Scripts folder)
    • can be shared with a file by clicking Share (same menu as adding a button)
    • this attaches the script to the file, so anyone with the file can run the script
    • unfortunately shared scripts can not be called by Power Automate
      • it can only call scripts stored on the connected OneDrive account

TriggeringScr.png

IntelliSense

Variables, Types and Interfaces

Get & Set

Basic Excel Actions

If

Loop

Send and Return Data

Additional functions