I made a project using the robotic enterprise framework that creates an excel file somename.xlsx using Excel Application Scope activity. When I run the robot on one machine, it works fine. When the robot is run on another machine, a fatal error occurs while running the job:
System exception at initialization: Microsoft Excel cannot access file ‘C:\Users\username\Documents\Foldername\57E83320’. Possible causes: filename or path does not exist - File is used by another program - the project folder you are trying to save has the same name as one that is open right now.
Usually Excel Applicaiton Scope creates a file named somename.xlsx at the path 'C:\Users\username\Documents\Foldername', but in this case no file is created before the robot stops the execution early.
In stead of ending with 57E83320, the path should end with somename.xlsx, maybe that is why the robot cannot access the file. I do not know where 57E83320 comes from, but I think the error might come from this. Any suggestions what to do?
I use Studio 2020.4.1 Community Licence and Excel Activities version v2.7.2
Hi Mukesh, the program has a Path Exists activity that takes the file path of the excel file as input followed by an if statement, that creates an excel file, if the path does not exist.
One thing - Before the Excel application scope - Can you print the Path and see if we are getting teh Correct path… As stated we are getting the 57E83320 extra here …
An approach can be removing the extra bot from the path using string manipulation and then passing it to the Excel scope
I found the solution. A digit in the folder name, that was included in the file path, had been changed by another person on the machine where the program was giving the error.