You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/office-automation/excel/launch-excel-action-failures.md
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/office-automation/excel/troubleshoot-excel-errors.md
+39-13Lines changed: 39 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,33 +3,59 @@ title: Errors when running desktop flows including Excel actions
3
3
description: Provides mitigation steps for errors generated by Excel actions in desktop flows.
4
4
ms.author: iomavrid
5
5
author: yiannismavridis
6
-
ms.date: 05/08/2023
6
+
ms.date: 07/21/2025
7
7
ms.custom: sap:Desktop flows\Office automation
8
8
---
9
9
# Errors when running desktop flows, including Excel actions
10
10
11
-
This article provides mitigation steps for errors generated by Excel actions in desktop flows. Most errors occur in the context of multiple Excel actions, and there's no strict mapping between them.
11
+
This article provides mitigation steps for errors generated by [Excel actions](/power-automate/desktop-flows/actions-reference/excel) in desktop flows. Most errors occur in the context of multiple Excel actions, and there's no strict mapping between them.
12
12
13
13
## More information
14
14
15
-
|Exception in error details|Mitigation steps|
15
+
|Exception|Mitigation steps|
16
16
|---|---|
17
-
|System.ArgumentNullException: Value cannot be null.</br>Parameter name: type|When Excel fails to open with this error, make sure that Excel is installed, licensed, and properly configured on the computer. You can also try to repair your Office installation.|
18
-
|System.IO.FileNotFoundException: documentPathSafe|The Excel file doesn't exist, or its name or path isn't spelled correctly. Also, the file path shouldn't contain more than 255 characters.|
19
-
|System.Runtime.InteropServices.COMException: Open method of Workbooks class failed|The Excel file path shouldn't contain more than 255 characters.|
17
+
|System.ArgumentNullException: Value cannot be null.</br> Parameter name: type|When Excel fails to open with this error, ensure that Excel is installed, licensed, and properly configured on the computer. If Excel is already installed, you can try to repair your Office installation.|
18
+
|System.IO.FileNotFoundException: documentPathSafe|Ensure that the Excel file exists and its name and path are spelled correctly. Also ensure that the file path doesn't contain more than 255 characters.|
19
+
|System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel' or one of its dependencies. The system cannot find the file specified.|Ensure that you have Excel installed on the computer.|
20
+
|System.IO.IOException: The process cannot access the file 'C:\YourPath\YourFile.xlsx' because it is being used by another process.|Ensure that the Excel application isn't being used or locked by another process. Try terminating all open Excel processes and restart Power Automate for desktop.|
21
+
|System.UnauthorizedAccessException: Access to the path 'C:\YourPath\YourFile.xlsx' is denied.| Ensure that access to the path and file isn't restricted, and Power Automate can access the file.|
22
+
|Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Excel document '<Excel_file_name>' not found.|Ensure that the Excel file is open and its name or path is spelled correctly.|
23
+
|System.OutOfMemoryException: Out of memory|Close all open Excel applications and unnecessary programs to free up memory, and then try again.|
24
+
|System.Runtime.InteropServices.COMException: Open method of Workbooks class failed|Ensure that the Excel file path doesn't contain more than 255 characters.|
20
25
|System.Runtime.InteropServices.COMException: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)|When an Excel file fails to open with this error, try to enable the **Nest under a New Excel process** option under the **Advanced** group of parameters. The existing Excel process might be terminated before opening this Excel file.|
21
-
|Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Excel document '<Excel_file_name>' not found.|Make sure that the Excel file is opened and its name or path is spelled correctly.|
22
-
|System.Runtime.InteropServices.COMException: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))|Make sure that the target Excel file is opened in Protected View.|
23
-
|System.Runtime.InteropServices.COMException: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))|The target Excel file shouldn't be edited (for example, a cell is actively being edited at the time of the action run) or blocked by a pop-up dialog when the corresponding Excel action runs.|
26
+
|System.Runtime.InteropServices.COMException: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))|Ensure that the target Excel file is open in Protected View.|
27
+
|System.Runtime.InteropServices.COMException: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))|Ensure that the target Excel file isn't being edited (for example, a cell is actively being edited at the time of the action run) or blocked by a pop-up dialog when the corresponding Excel action runs.|
24
28
|System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC|When you use an Excel action where a column, a row, or both need to be specified, the column index should be greater than zero and less than 16,385, or the column letter should belong to the range between A and XFD. Furthermore, the row index should be greater than zero and less than 1,048,577.|
25
-
|System.Runtime.InteropServices.COMException: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))|The Excel instance should be open and active, so the Excel file shouldn't be closed manually or through the "Close Excel" action before the rest of the Excel actions take place.|
29
+
|System.Runtime.InteropServices.COMException: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))|Keep the Excel instance open and active until all Excel actions are complete. Don't close the file manually or through the "Close Excel" action.|
30
+
|System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {ID} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).|Ensure that you have Excel 2013 or a later version installed on your computer.|
26
31
27
-
The following exceptions come with embedded mitigation steps in their text.
32
+
### Exceptions with embedded mitigation steps
28
33
29
-
|Exception in error details|
34
+
Some exceptions include mitigation steps in their error messages:
35
+
36
+
|Exception|
30
37
|---|
31
38
|System.Runtime.InteropServices.COMException: The cell or chart you're trying to change is on a protected sheet. To make a change, unprotect the sheet. You might be requested to enter a password.|
32
-
|System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.</br>Parameter name: The column number must be greater than one or less than 16384.|
33
39
|System.Runtime.InteropServices.COMException: The file name is too long. Rename the file with fewer than 207 characters.|
34
40
|System.Runtime.InteropServices.COMException: The password you supplied isn't correct. Verify that the <kbd>Caps Lock</kbd> key is off and be sure to use the correct capitalization.|
35
41
|System.Runtime.InteropServices.COMException: Excel cannot open the file '<Excel_file_name>' because the file format or file extension is not valid. Verify that the file hasn't been corrupted and that the file extension matches the format of the file.|
42
+
|System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.</br> Parameter name: The column number must be greater than one or less than 16384.|
When you try to open a blank or existing Excel file in Power Automate for desktop, you might receive an error similar to:
47
+
48
+
> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800xxxxx
49
+
50
+
### Cause
51
+
52
+
This error might occur due to one or more of the following reasons:
53
+
54
+
- Office apps (or just Excel) aren't properly installed.
55
+
- Power Automate for desktop isn't properly installed.
56
+
- The Excel file is synchronized with OneDrive.
57
+
58
+
### Resolution
59
+
60
+
- Manually [uninstall](/power-automate/desktop-flows/install#uninstall-power-automate) and [reinstall](/power-automate/desktop-flows/install) Power Automate for desktop. If it doesn't work, ensure you have Excel properly installed.
61
+
- To work around the error caused by the synchronization with OneDrive, see [Using Excel files synchronized through OneDrive or SharePoint](/power-automate/desktop-flows/actions-reference/excel#using-excel-files-synchronized-through-onedrive-or-sharepoint).
0 commit comments