Exception HRESULT: 0x800AC472 (Excel out of scope)


#1

I have looked around this forum but can’t seem to find a solution to my error. I have a simple program: excel application scope, read a range, do some vb, close the workbook and write it back into the worksheet. The FIRST time I try running the program I get this Excel out of scope error, however when I rerun the program it works fine.

Does anybody know why this might happen? The file that I am working with is a .xlsx file that is emailed to me daily and I drag it into my desktop without ever opening it if that makes a difference.


#2

I think when you run for the first time excel sheet was already opened


#3

I’ve double checked just now and the file is closed when running. Still got the error


#4

check the task manager, any Excel service is running or the excel format must be .xlsx or .csv


#5

@mkkajtez You can try this at the beginning of the bot use kill process in the following link you can download file so it will close all the excel which are opened