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:WindowsSysWOW64configsystemprofileDesktop (for 64 bit Windows) or C:WindowsSystem32configsystemprofileDesktop (for 32 bit Windows)

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

解决方法:

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

原文地址:https://www.cnblogs.com/xia-dong/p/12118448.html