打开excel时 报错0x800AC472 急解决办法

解决方法:windows RUN里运行:"C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE" /regserver 其中office16取决于版本 然后又报错:com_error: (-2147418111, 'Call was rejected by callee.', None, None)--- 解决方法:加sleep.excel = win32.gencache.EnsureDispatch('Excel.Applicat...
打开excel时 报错0x800AC472 急解决办法
excel = win32.gencache.EnsureDispatch('Excel.Application')

time.sleep(3) #否则报错

wb = excel.Workbooks.Open(resultfile)

报错0x800AC472

============================================

解决方法:

windows RUN里运行:

"C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE" /regserver

其中office16取决于版本

然后又报错:com_error: (-2147418111, 'Call was rejected by callee.', None, None)

------------------------------------------------------------------------------------

解决方法:加sleep.

excel = win32.gencache.EnsureDispatch('Excel.Application')

time.sleep(3) #否则报错

wb = excel.Workbooks.Open(resultfile)2022-07-23
mengvlog 阅读 6 次 更新于 2025-07-21 17:01:27 我来答关注问题0
檬味博客在线解答立即免费咨询

报错相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部