Hi,
If you got this below error on your code,
Office has detected a problem with this file. To help protect your computer this file cannot be opened.
Here you can find the solution to avoid such errors.
Just add this below line when you are initializing excel application.
if you set it to
If you got this below error on your code,
Office has detected a problem with this file. To help protect your computer this file cannot be opened.
Here you can find the solution to avoid such errors.
Just add this below line when you are initializing excel application.
if you set it to
msoFileValidationSkip
before the Open
statement, it should bypass the file protection check.excelApp.FileValidation = MsoFileValidationMode.msoFileValidationSkip;