Hi Sameer,
You mention that the same code works fine in the next attempt but is this using exactly the same input file on the same machine? Your approach to finding the problem would be to try and isolate this to specific files and machines. If it fails it should then fail consistently across repeated executions of the same steps with the same inputs. Once you reach this stage you can examine the differences and compare working files against none working ones.
Some suggestions I've seen on this topic include making sure you have lower case sheet names, the workbook is not read-only, having no hidden worksheet.
------------------------------
John Cowell
Senior Software Support Analyst
Blue Prism
------------------------------
John Cowell
Senior Software Support Analyst
Blue Prism