we have two robots on two machines running (we don’t have an ochestrator). They both do their jobs and now we want them to write a new row in an excel spreadsheet, which job they did at which time and so on.
We would read the datatable from the excelfile with read range, add the new row and then write the datatable again as the excelfile with write range.
How can we prevent, that the two machines try to read or write at the same time and we get exceptions? Can we check the file, if it is used by an other process or machine?
Thank you for your help
yes it has using these codes.Check if a shared workbook is already open by another user
thank you for your answer.
How can I use this sort of code? That doesn’t look like UiPath, or is there a special place to write such code in UiPath?
you can even add your file to share point or office 365 to do same time edit.
I’m sorry, I’m all new to VB and in our corporate I have only limited possibiities to use the academy and youtube
I get a lot off errors when I try to invoke the code from the link (see pictures, sorry errormessage is in german), starting with unknown types ‘application’, ‘workbook’ etc.
Do I need some dependencies for VB or other things installed to the computer?
@mm1904 - i wouldn’t bother creating custom code or invoking c#/vb.net code. This can be handled with a simple try-catch instead.
Workbook read or write range (NOT excel read range) will throw an error if the workbook specified is already open. Therefore, you can put it inside a try catch so it will try to update excel. If it is already open, it will throw an error and the catch loop can handle it however you choose
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.