Could not load type Microsoft.Office.Interop.Excel._Application

不问归期 提交于 2019-11-29 15:36:35
Bjarki Heiðar

vcsjones commend got me on the correct track. after turning off Embedding Interop Assemblies I needed to edit the web.config to trust Excel

<system.web>
    <trust level="Full" originUrl="" />

It sounds like you have a bad reference, not bad code. Has this code ever worked? Have you tried removing the reference to the Excel Interop and re-adding it again? Since it doesn't even get into your method, my assumption is that when the system tries to load the reference dll, it crashes.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!