Excel Automation in Power Automate Desktop

power-automate-desktop-logo-excel

Working with large amounts of data in Excel is common, especially in large organizations where Excel is used in many departments such as sales, accounting, and staff. Excel spreadsheets contain data in rows and columns, which spread across all worksheets

Entering, processing, and selecting data from an Excel document are the most common algorithmic tasks performed by hand, which means that there are many possible scenarios and cases used to make these tasks work.

For example, consider a situation in which a company receives a list of customers in an Excel document. The structure of the document may differ from the way the company maintains its records. Before a new list can be added to any main file, the data must be rearranged to match the format of the main file.
sample2-excel-automation-data-power-automate-desktop

Therefore, an Excel document should be read, rows or columns should be moved to match the main file format, and the data should be copied to the main file to ensure that there are no errors or losses. This task can be done mechanically to ensure that all updates to the main file take place without human intervention and in a flawless manner.

This article demonstrates some of the most common uses of Excel actions by designing a flow that performs Excel-related business functions.

CMD actions in Power Automate Desktop

Creating a flow with Excel Actions

  • Create a flow name Excel-automation.
    flow-name-excel-automation-power-automate-desktop
  • We have an excel file created named NewEmp.xlsx in the Demo folder.
    file-excel-automation-power-automate-desktop
  • Now, to open the Excel file we use Launch Excel action. We have two options to Launch Excel one with a blank document and with open the following document i.e. pre-existing document.
    launch-exel-automation-power-automate-desktop
  • Select open the following document and add a Document path to it.
    launch-exel-path-automation-power-automate-desktop

PDF Automation in Power Automate Desktop

Read from Excel Worksheet

  • Now, we use the Read from Excel worksheet action to retrieve data. The Excel instance will be automatically generated. We have three opinions here to retrieve the excel data that are: The value of single a cell, Values from a range of cells, and Values from selection.
    read-exel-automation-power-automate-desktop
  • Select Values from a range of cells and add Start and End range with respect to columns and rows. Click on Save.
    read-exel-path-automation-power-automate-desktop
  • Add the File path and add the ExcelData in Text to write. Click on Save.
    write-text-to-file-exel-automation-power-automate-desktop
  • To close the excel file we use the Close Excel action. Click on Save.
    close-exel-automation-power-automate-desktop
  • This is how our flow looks now. It will read data and then it will write the data into a text file.
    flow-exel-automation-power-automate-desktop
  • We have here the data, which we specified and that has been read by the flow. It's in the form of an Emp.txt file.
    emptext-exel-automation-power-automate-desktop
  • To retrieve the value of a single cell we add the cell start column and start row. Click on Save.
    single-value-read-excel-automation-power-automate-desktop
  • Save and Run the flow. We get the single-cell contains from cell A1.
    result-single-value-read-excel-automation-power-automate-desktop

XML Automation in Power Automate Desktop

Write to Excel Worksheet

  • This action is used to write anything into the cell in an excel worksheet. Drag and drop Write to Excel Worksheet action into the workspace. Add Value to write as Shay and mode as On specified cell. Enter the row and column number and click on Save.
    write-excel-automation-power-automate-desktop
  • Save and Run the flow. Now, we have the text in the B7 cell.
    write-file-excel-automation-power-automate-desktop
Insert a row and column into the Excel worksheet
  • To insert a row drag and drop the Insert row to Excel worksheet action into the workspace. Add row index as 7. Click on Save.
    insert-row-excel-automation-power-automate-desktop
  • To insert a column drag and drop the Insert column to Excel worksheet action into the workspace. Add column index as B. Click on Save.
    insert-column-excel-automation-power-automate-desktop
  • Save and Run the flow. Here, in our worksheet, a blank column and row are inserted on the specified index value.
    insert-column-row-results-excel-automation-power-automate-desktop

File Actions in Power Automate Desktop

Add new Worksheet
  • To add a new worksheet we use this action. Drag and drop the Add new worksheet action into the workspace. Add the name for the worksheet and add the worksheet as the Last worksheet. Click on Save.
    add-new-worksheet-excel-automation-power-automate-desktop
  • Save and Run the flow. We have our new worksheet created as EmpDetails.
    emp-details-worksheet-excel-automation-power-automate-desktop

Rename Excel worksheet

  • We use this action to rename a worksheet. Drag and drop the Rename Excel worksheet action into the workspace. Add the name of the worksheet and add the new name for the worksheet. Click on Save.
    rename-excel-automation-power-automate-desktop
  • Save and Run the flow. We have our worksheet name changed to Details.
    new-rename-excel-automation-power-automate-desktop

Folder Actions in Power Automate Desktop

Delete Excel worksheet

  • We use this action to delete a particular worksheet. Drag and drop the Rename Excel worksheet action into the workspace. Add the name of the current worksheet and add the new name for the worksheet. Click on Save.
    details-excel-automation-power-automate-desktop
  • Save and Run the flow. The worksheet Details has been deleted.
    delete-excel-automation-power-automate-desktop

This Excel automation is quite useful in many cases. Performing tasks related to storing and using the information in Microsoft Excel is essential for many businesses. Power Automate Desktop makes it easier and faster to do such tasks.

Clipboard Actions in Power Automate Desktop

About Author :

I am Sharvari Raut, having sound knowledge and experience in technical writing. Currently, pursuing my B.Tech in Computer Science and Engineering.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions