Excel doesn't come front after download

I download an excel file from a browser. And I use open excell application scope to do operations inside excel workbook. But sometimes after downloading the file, the window doesn’t come front and acitivities that are inside excel application scope doesn’t working. To avoid that I click manually the excel file. But sometimes it works without a problem. I tried to use activate activity but it didn’t work.

Try to give some delay after downloading the excel.

It didn’t work. what can I try else?