How to record an Office Script?

  • Open Excel in cloud
  • Go to Automate
  • Click on Record Actions
  • Do all the actions 
  • Click Stop

Then you can see the script and run it. Running of Office Script is typically done by Power Automate.