本文介绍了Excel的参考资料的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将Excel文件数据传输到MS SQL数据库。
我添加了Excel 12.0的参考资料:
Microsoft。 Office.Interop.Excel
Interop.ADODB
Interop.ADOR
Interop.ADOX
Interop.DAO
错误代码:
I am trying to transfer Excel file data to a MS SQL database.
I added References for Excel 12.0:
Microsoft.Office.Interop.Excel
Interop.ADODB
Interop.ADOR
Interop.ADOX
Interop.DAO
Error Code:
Could not load type 'Microsoft.Office.Interop.Excel._Application' from assembly 'Excel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The type is marked as eligible for type equivalence, but the containing assembly is not loaded as fully trusted.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'Microsoft.Office.Interop.Excel._Application' from assembly 'Excel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The type is marked as eligible for type equivalence, but the containing assembly is not loaded as fully trusted.
推荐答案
这篇关于Excel的参考资料的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!