My sequence attempts to open an application which I then try to type text which is contained in column A of an excel file. I then commit the text via clicking a button in the application. I capture the close time of the click activity which I store in a variable which I write to the corresponding row in column B of the same excel file. I try to repeat this by looping through 5 rows of the spreadsheet, incrementing a variable to writer the time to the next row. Currently this only works for the first row and then I get an error
For Each Excel Row: Exception from HRESULT: 0x800401A8
I assume this is caused because at the end of each loop I am opening another Excel Application Scope activity to allow me to write the variable stored time back to the excel file which then closes. I have spent a couple of hours trying to work out if there is a way of keeping the excel file open but from discussions on the forum it appears there is not. Could someone please give me some pointers on how I can tackle this. I suspect my approach is not the best way to achieve what I’m looking to achieve.