File by multiple Bots

I have a file used by BOT and code is already in production but without changing the code I want to use the same file by multiple bots how can we use that. The file is password protected and also it’s used through queues.

You can use the same file for multiple bots as long as multiple bots are only reading from the file. Only one process may modify it at a time.

To do this, You’ll need an Excel Read Range activity set to Read Only, and you will need to specify in the Excel Application Scope that the file is password protected. You will need to pass the password as a secure string in order to open the file.

This will largely depend on the file type and contents and whether you are opening the source directly or using another application such as an xls/csv using Excel in Anthony’s example.

In practice when a file is opened for writing but sometimes reading and deleting too, an application will lock the file from use by other processes; however this is not always done (e.g. the file can be opened with shared access and programs would lock specific ranges of the file) and the use case will largely depend on your specifics.