Excel File in Use - While writing XLSX file from 2 BOTS

Hello,

We have BOT which reads/writes into an excel File. We are running 2 instances of this BOT. So 2 instances are reading/writing to same file.

For reading - we are using application scope in read-only mode, not visible mode. After reading close workbook outside application scope.

Before writing we are checking file is available for Writing with C# code.

For writing - we are using application scope, not visible and save workbook activity after writing. And close workbook outside application scope

If fails BOT will retry couple of times. But problem is occasionally we are getting an error message called “.xlsx is currently in use. Try again later” (Attached screenshot) . When BOT throws this error, BOT execution will get stuck there. Please suggest. Let me know if you need more details.

Please suggest.

Regards,
Harsha.

Forgot to add few more details.

Bot is throwing this excel error message, once “Save Workbook” activity is called. File is getting saved in a network location.Using UiPath 2018.

After this bot got stuck. We tried to put if element exists, but it also didn’t work. Bot didn’t execute element exits activity also. Bot will continue execution only after click on OK on message box or killing excel process.

Please let me know if you need more details.

Regards,
harsha.

@harshap

Check below post

Hope this helps

Thanks

Thank you very much @ksrinu070184 for response.

I tried this option, In this also BOT got stuck with some other message box saying File Now available. (Attached screenshot).

excel-Error2

@harshap

Can you remove Visible in properties and check?

Also please share screenshot any error in uipath

Thanks

Thanks @ksrinu070184 for response.

I tried by disabling visible in Application Scope properties. Still it is same. And “.xlsx is currently in use. Try again later” message box pops up and there is no other error message in Uipath.

Regards,
harsha

@harshap

as this is .xlsx file instead of using excel application scope can you use Workbook activities and try

let me know the status

Thanks

thanks again @ksrinu070184.

Sure, I will try with Workbook instead of Excel Application Scope and will let you know.

Regards,
harsha.

1 Like

thank you @ksrinu070184 . We tried to read/write using workbook activities instead of Excel Application scope. Now we have not got that issue as of now. We found that workbook activities much faster. May be that might be the reason. Thank you very much!!

1 Like

@harshap

Mark as solution if this helps

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.