Skip to content

Latest commit

 

History

History

README.MD

Generate a new unique identifier and add a row to table and range

This scenario helps a user generate a unique document number with a specific format and add an entry to a range or table (two sepearate scenarios). The new entry or a row added will contain the newly generated unique document number and few other attributes passed to the script.

The sample contains two part.

  • Part-1: achieves this scenario by reading and adding row to a worksheet containing plain range.
  • PArt-2: achieves this scenario by reading and adding row to a table (little bit simpler).

Screenshots

Part-1 Generate document number on a range

Before the new row is added

Range before

After the new row is added

Range after

Part-2 Generate document number on a table

Before the new row is added

Table before

After the new row is added

Table after

Use this in Power Automate

Office Scripts source code

  1. Generate and add row to range
  2. Generate and add row to table

Excel files used

Download the input Excel file used in this sample and try it out yourself!

Excel file