By using action Excel in Power Automate (formerly known as Microsoft Flow), you'll typically want to automate tasks involving Excel files, such as creating, updating, or reading data from spreadsheets
First you have to sign in to Power Automate desktop for downloading PAD click here Then from actions under excel you have to click on "Launch Excel" action.
After clicking on above launch excel icon another window will be opened as shown below.It has already selected launch excel with blank document.Click on save and run.A blank excel file will be launched.
To open any specific document you have to select open the following document in place of blank document and provide the path of the file and click on save and then run.It will automatically launch the specified file.
Variable Produced in Launch Excel in Power Automate:
The output of all power automate actions will be stored in excel instance.we can also rename with the specific excel name to use it further.
Open as Read only in Launch Excel in Power automate:
Open as read only appears in launch excel when you open file by specifyingÂdocument path.It opens given file as read only when on.
2.Read from excel worksheet Action:
After launching excel next task is to read values from excel file.To read values from given file click on "Read from excel worksheet icon" in actions.A pop up will appear as shown in below image
InÂExcel instance section %excelinstance% is variable produced by launch excel action or simply it is the file that we have launched in launch excel action.
In retrieve you can retrieve data by 5
In start column need to mention column name A,B,C etc
In start row need to mention row numbers 1,2,3 etc
3.Attach to running Excel:
With the help of action attach to running excel we can attach or work with already opened excel notebook in our flow.It will automatically display opened excel file name in document name field if no excel file is opened it display none.
We can see below as 'Book1' file is opened in system it is displaying file name in document name section
4.Close Excel:
Close Excel Action in power automate will close opened excel file.we need to specify excel instance that need to close.excel instance must be specified previously and in Before closing excel we need to specify whether and how to save the document of this instance before closing that instance.we can select from 3 option from drop down.
- Do not save Document-It will not make any change in documents.
- Save Document -It will save document with changes being done after opening excel instance.
- Save document as-It will as k form path of the file and extension of the file you want to save.
5.Write to Excel Worksheet:
It is used to write a value in excel cell.We can specify excel instance ,
Value to write-It is the value we want to write in excel cell.
Write mode-On specified cell we have to specified cell value such as B2,B3,A4 etc,On currently active cell it will automatically paste values in currently active cell.
It is very useful action used to work with excel in power automate.