Live Developer Training: next batch coming soon. Be the first to know.Live training: next batch soonJoin the waitlist →Join →

Extract Data from Word Documents to Excel using Power Automate Desktop

In this Power Automate Desktop tutorial, we will see how to extract data from Word documents to Excel using Power Automate Desktop (PAD) automatically.

This tutorial will be very much helpful to you if you want to extract data from Word documents using Power Automate. Suppose you have a list of invoices, and you want to extract the invoice details like invoice name, number, price, invoice date, etc., from all the invoices automatically without doing it manually; then you can follow the complete tutorial. It will pick one invoice, extract all the details and add them into an Excel file. And then pick the next invoice.

For this particular example, I have taken a few order forms having the following fields:

  • Order Number
  • Name
  • How did you hear about us?
  • Delivery Method
  • Delivery Date
  • Biscuit Type:
  • Order Quantity

All the order forms are inside a folder, and the PAD flow will extract the above information and add it to an Excel file. The Word file looks like the one below.

extract data from Word to Excel using Power Automate Desktop

Here, we will loop through each file using For each loop in Power Automate Desktop. Then extract the data from Word and write it in the Excel file. The Excel file contains the following fields:

  • Order Number
  • Name
  • How did you hear about us?
  • Delivery Method
  • Delivery Date
  • Biscuit Type:
  • Order Quantity
Power Automate Desktop extract data from Word file to excel file

You will get the zip folder containing the Word and Excel files by the end of this tutorial.

Note

Both the Excel file and the above Folder are located in my local system.

By the end of this tutorial, you will get the zip folder of the Word and Excel files. Download both the Excel file and Word folder and unzip the folder.

Let’s create a flow that will extract data from Word to Excel using Power Automate.

Extract data from Word to Excel using Power Automate Desktop

Here we will see how to extract data from Word to Excel using Power Automate Desktop.

Before we will start creating the flow, you must have the Word files and Excel files like the above in your local system.

Step 1: Open Power Automate Desktop -> Click on +New flow. Then provide the flow name and click on Create.

Power Automate Desktop transfer data from Word to excel

Step 2: We will get all files in the folder, so expand the Folder section under Action. Then drag and drop the ‘Get files in folder‘ action to the workspace. Then provide the below information under ‘Select Parameter’:

  • Folder: Select the folder path by clicking on the folder icon.
  • File Filter: Here, we will get all files, so I will provide *.

Also, this will generate a variable for you i.e., Files. If you want files from Subfolder, then you can enable the option. Then click on Save.

Power Automate Desktop copy data from Word  to excel

Step 3: Now we will add an action that will open an Excel file, so expand the ‘Excel’ section, under Action. Then drag and drop the ‘Launch Excel’ to the workspace. Then provide the below information under Select parameters:

  • Launch Excel: As our Excel contains table and column names, select ‘and open the following document’ from the dropdown.
  • Document path: Select the Document path of your Excel file.

Then enable the ‘Make instance visible’, so it will be visible to us when it gets launched. Also, it produced a variable called ‘ExcelInstance’. Then click on Save.

Power Automate Desktop copy data from Word  to Excel file

Step 4: Now we will loop through all files, so expand the Loop section, then drag and drop the ‘For each’ action. Then provide the below information:

  • Value to iterate: Click on variable icon {x}, and select ‘Files’. Click on the Select button.

This will create a variable called CurrentItem, where the current file will store.