Excel file overwritten by RPA


I am having an issue with the bot I have built. This bot is designed to open an Excel file that is on a SharePoint site using the Excel Application Scope activity and then use a Read Range activity to copy the data in the Excel file to a data table for use later.

The issue I am having is that, at times, the bot will overwrite this Excel file with a complete new, blank Excel file and then will error out because the bot the Read Range activity will not work properly. This results in a lot of time being wasted for our Business User who has had all of their data they entered wiped out.

I have read through the Excel Application Scope activity documentation and found some options that appear to be able to disable this feature of overwriting the original Excel file, but these have not worked. I guess the bigger question is, why is the RPA not able to find this Excel file sometimes, but other times it works fine?

Any help with this would be appreciated. Some of our end users are getting really frustrated with this and I don’t blame them.



you could check first if the file exist with the “Path exist” and then go on with an “IF” activity, which only opens the file if the file exist.

Also there exist a second “Read Range” activity which does not need an “Excel Application Scope” and so does not open the excel file. And no new excel file is created if the excel file could not be found.

I hope that helps :slight_smile:

HI James. As per ur post I understand that you are just reading the values present in excel. As a best practice, you can download the excel to ur local system first and then use Excel application scope with read range activity from the downloaded excel file.

Thanks Patrick! Using this second Read Range activity did the trick to prevent the bot from overwriting the Excel file.

It’s still very odd how the bot behaves. And others in my group have experienced it too. If I start up/restart my computer and then try to run the bot, it will tell me the file doesn’t exist. It will keep doing this until I actually open the Excel file and close it. After I’ve done that, it will recognize the file and perform the Read Range operation. It’s almost as if the bot needs the file to be stored in memory before it can recognize it. Bizarre.

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