OLE error code:800A03EC in Microsoft Excel,Microsoft Excel cannot access the file...

遇到了就记录下吧

感谢下面这边博文提供了解决方法
https://port135.com/2014/05/09/solved-net-excel-interops-issue-microsoft-office-excel-cannot-access-the-file-abc-xlsx/


环境
OS:Win10
Excel:2013

问题:
在本地执行没有问题,ssh远程执行就出现如下问题

 

 

解决方法:
该博文第一步便解决了
Create directory C:\Windows\SysWOW64\config\systemprofile\Desktop (for 64 bit Windows) or C:\Windows\System32\config\systemprofile\Desktop (for 32 bit Windows)

 

 

 

补充一下,今天又遇到一个新问题,ruby在生成excel时候,也是本地正常,远程就报错:

 

 

解决方法:

 

 将false改为true就好了,本地@xl.Visible = false;远程@xl.Visible = true

posted on 2019-12-30 10:42  骑着蜗牛追太阳  阅读(1365)  评论(0编辑  收藏  举报

导航