Excel Automation with PAD

Excel automation with Power Automate Desktop: actions for reading, writing, sorting, and filtering locally without a cloud connector.

Many Excel tasks in companies are still done manually today: copying figures from a raw data file, sorting, filtering, pasting into a template, saving, and passing it on to the next person. Power Automate Desktop (PAD) offers a dedicated group of Excel actions for exactly this kind of work, communicating directly with a locally installed Excel application, entirely without a cloud connector and without the file having to be uploaded anywhere first.

It's important to understand the difference from the familiar Excel Online integration in cloud flows before you get started. The desktop actions control a real Excel instance on your Windows machine via COM, just as a macro would. This means add-ins, macros, and complex formatting remain usable, but you're also bound by the limits and quirks of a local Excel instance. According to the official Excel actions reference, this group covers the full range from opening, reading, writing, and formatting through to saving and closing.

Starting or attaching to an Excel instance

Every Excel flow in PAD starts with one of two actions that create what's known as an Excel instance, the variable that all subsequent steps work with.

  • Launch Excel: Opens either a blank document or an existing file via the document path. Parameters such as "Make instance visible" (default: enabled), "Open as read-only", and "Load add-ins and macros" determine how the file is opened. For password-protected files, the password can be entered directly.
  • Attach to running Excel: connects the flow to an Excel file that's already open, identified by file name or path. Useful when a file has already been opened by another action or by a person.

Both actions create an ExcelInstance variable that you reference in every further Excel action. Without this step, none of the following actions will work.

Reading data: from a single cell to an entire sheet

The action Read from Excel worksheet is usually the second step in a flow. Using the "Retrieve" option, you choose whether you want to get the value of a single cell, a cell range, the current selection, or all available values on the worksheet. The "First line of the range contains column names" option lets header rows be used directly as column names in the resulting data table, so later actions can address the data by column name instead of by letter.

One detail that often causes confusion: if the "Retrieve cell contents as text" option is enabled, PAD returns exactly what Excel displays, including the hash symbols (###) when a column is too narrow. According to the known limitations in the documentation, the action Resize columns/rows helps here before reading, or you can skip the text option entirely and read the raw cell values instead.

Writing data and managing worksheets

For the counterpart, there's Write to Excel worksheet. This action writes a value, a list, or an entire data table either to a specifically specified cell (column and row) or to the currently active cell. If the variable being written contains a table, PAD automatically fills in the corresponding cells to the right and below, even if data is already present there.

Around the actual read and write operations, PAD offers a whole range of management actions that let you build a flow robust enough for production use:

  • Add new worksheet / Delete Excel worksheet: create and remove sheets by name or index.
  • Set active Excel worksheet / get: switch specifically between multiple sheets.
  • Get first free row from column in Excel worksheet: returns the row number of the first empty cell in a column, ideal for always appending new records to the end of a list without overwriting existing rows.
  • Sort cells in Excel worksheet and Filter cells in Excel worksheet: apply sorting or filtering rules to an active sheet, a table, or a named range, optionally taking a header row into account.
  • Save Excel and Close Excel: cleanly wrap up the flow, important so that no Excel processes are left hanging in the background.

Practical example: a recurring report

A typical use case for Excel automation with PAD looks like this: a flow starts Excel with a raw data export file, reads in all available values including the header row, filters the data table by a specific column, for example a status or a time period, sorts the result, and then writes it into a prepared report sheet. Finally, the flow automatically saves and closes the file. What used to be ten or fifteen minutes of manual clicking now runs in seconds and can additionally be triggered on a schedule, so that the report is up to date in the agreed folder every morning before anyone even asks for it.

Important for practice: because PAD works with a real desktop Excel instance here, you generally need a machine with a licensed installation of Excel for these flows, whether that's your own workstation or a dedicated automation environment. Anyone wanting to run several such flows productively and reliably should also pay attention to error handling from the start, for example using the "On error" options of individual actions, so that a blocked Excel process doesn't bring the whole flow to a halt. For a structured introduction to the topic, the official Excel automation in Power Automate for desktop learning module a step-by-step introduction along with a practice exercise. With Power Automate consulting from NordFlux, we help set up such flows to be robust from the start, so that a digital worker can take over the Excel routine while you retain full control over the outcome.

Limitations you should know about

Not every Excel file can be automated with PAD without further ado. The documentation mentions one recurring source of errors above all: files located in a folder synchronized via OneDrive or SharePoint often cause the Launch Excel action to fail with a "File not found" error, because COM automation isn't fully compatible with the synchronization of these services. As a workaround, Microsoft recommends either working with a local copy of the file and writing it back at the end, or instead opening the file via the "Run application" action and then attaching to it via Attach to running Excel into the flow. Anyone planning production Excel flows should factor in this case from the start, rather than discovering it only after the first failed run.

Frequently asked questions

Do I need a cloud connector or a premium license for Excel automation in PAD?

No. The Excel actions in Power Automate Desktop work with a locally installed Excel application via COM and are part of the desktop flow actions, not the cloud connector world. All that's required is a working, licensed Excel installation on the machine where the flow runs.

How do I open an Excel file that someone has already opened?

That's what the Attach to running Excel action is for. It connects the flow to an already running Excel instance via file name or path, instead of opening a new one, and likewise creates an ExcelInstance variable for the following steps.

Why does my flow show hash signs (###) instead of actual values?

This happens when the "Retrieve cell contents as text" option is enabled in the "Read from Excel worksheet" action and a column is displayed too narrow in Excel. PAD then reads exactly what would be visible on screen. The action Resize columns/rows before the read operation helps here, or you can skip the text option and work with the raw cell values.

Can I also automate Excel files from OneDrive or SharePoint with PAD?

Not reliably directly from the synchronized folder, because according to Microsoft, COM automation and the synchronization mechanisms of OneDrive and SharePoint are not fully compatible. The usual workaround is therefore to use a local copy of the file, which is written back after processing.

Can a PAD flow run existing Excel macros?

Yes, via the Run Excel macro action, provided the "Load add-ins and macros" option was enabled when the Excel instance was started. The macro name is entered as text, and optional arguments are separated by semicolons.

About NordFlux

NordFlux UG (haftungsbeschränkt)

NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.

More about us
Free initial analysis

Concrete questions about automation or AI?

In a free initial analysis we discuss your case directly. No strings attached.