How do I prevent these errors from happening. I have attached my code.
Error 1 below usually occurs when I'm trying to close the excel while data are being logged.
Error 2 below usually occurs when the previous file with the logged data is still open and I'm trying to run a new test.
Is there any way I can prevent these errors like creating new file before every run.