The project has a script that opens the Excel file using Microsoft.Office.Interop.Excel and System.Runtime.InteropServices.
The script fails with Microsoft Excel cannot access the file error.
The following points were checked:
- The Processing Station computers have Microsoft Office installed and activated.
- The file is not in use (is not opened by any other program or Excel).
- The file path is correct.
- The user that runs Processing Station has Administrator rights and has full access to the Excel file.
- The Excel file is not corrupted.
The user that runs the Microsoft Excel Component Service may have insufficient rights.
Explicitly specify the user with Administrator rights and with full access to the Excel file in the Microsoft Excel Component Service:
- Open Component Services.
- Navigate to DCOM Config > Microsoft Excel Application.
- Open its properties and switch to the Identity tab.
- Specify the new user.