The Bot is getting stucked in unattended mode only when the excel file is opening through Use excel file activity.
The same code is running in attended mode.
Excel contains circular reference formula, so to handle this use Excel activity is used inside Excel scope activity-
Please find the attached Excel activity properties and Excel settings
Excel may display a hidden dialog box or wait for user interaction. In Attended mode, the dialog can be handled or is visible. In Unattended mode, the robot session cannot interact with such prompts, causing the Use Excel File activity to hang indefinitely. This behavior has been reported by UiPath users when Excel becomes unresponsive while opening workbooks through Excel Scope/Application Scope activities
Try login manually into the bot machine, then trigger the bot and observe if any popup is there or excel is getting freeze etc.
Hi @shahneel.zia2,
You can try the below steps:
- Log in to the VM using the same Windows account that the unattended robot uses. Open the workbook manually and check for any prompts. Resolve or disable these prompts before running the automation.
- Kill excel process before even executing anything related to excel in your solution. This will open the file freshly.
- Upgrade the Excel packages to latest and try it again.
- Try to use workbook activities instead of Excel activities where possible. Because Workbook activities do not open the excel file.
This is the similar kind of an issue look if you could resolve through the solutions provided by others.
Cheers!
Use excel process scope activity around use excel file and give the below settings and check
cheers
Hi shahneel
i think the key detail is the circular reference you mentioned. When Excel opens a file with circular references and iterative calculation is off, it shows a warning popup, and that setting lives in the user profile, not in the file. So on your machine its probably enabled and you never see it, but the robot account has a fresh Excel profile where its off, the popup shows up in a session nobody sees and the bot just waits forever. That would explain why the same code runs fine attended
you could try logging into the machine with the robot account itself, open Excel once, enable iterative calculation in File, Options, Formulas, and dismiss any first run prompts while youre there. After that the unattended run should open the file normaly. hope it helps