开发者

How to prevent Excel from wanting to start in Safe Mode?

开发者 https://www.devze.com 2022-12-26 07:19 出处:网络
We have a background process that calls Excel for generation of report spreadsheets. Occasionally, a crash or inadvertent server reboot will occur while Excel is running. The first launch of Excel aft

We have a background process that calls Excel for generation of report spreadsheets. Occasionally, a crash or inadvertent server reboot will occur while Excel is running. The first launch of Excel after the restart brings up the dialog box (paraphrasing here) "Would you like to start Excel in safe mode?" (Yes/No)

The issue is that our background app can't handle this dialog box, and acts as if Excel will no开发者_Python百科t start properly, and the background jobs fail as a result.

I can find CL switches for starting Excel in safe mode, but I can't find anything that will instruct Excel to always start in normal mode without that prompt dialog.

(I don't have access to the other program's code, so I can't make it pass through a "Yes" value if it runs into that box.)

Is there a registry hack or some other way I can force Excel into normal mode every time it's called?


I just had this problem, I fixed it using Excel switches. You can find more info here https://support.microsoft.com/en-us/kb/291288

Try adding "/e" when starting Excel, for example:

EXCEL.exe /e "C:\My Documents\File.xls"

That should do the trick!


I doubt if there would be a switch to prevent excel from opening in safe mode, since safe mode is a recovery mechanism its bound to be activated if excel experiences a crash.

0

精彩评论

暂无评论...
验证码 换一张
取 消