300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.E

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.E

时间:2021-05-23 00:53:10

相关推荐

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.E

前段时间做了个将Txt中数据导出到Excel中的C#小应用程序,一直都运行很好的。今天突然有同事安装时,报如下错:

************** Exception Text **************

System.InvalidCastException: Unable to cast COM object of type System.__ComObject to interface type Microsoft.Office.Interop.Excel.Application. This operation failed because the QueryInterface call on the COM component for the interface with IID {000208D5-0000-0000-C000-000000000046} failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

at TxtToExcelDemo.ExcelOperate.ExcelFileOperate.CreateExcelFile()

at TxtToExcelDemo.MainForm.btnLoadOut_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Mess

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。