错误115types“Excel.IExcelDataReader”未定义

我有一个与Excel导出和导出的VB.NET应用程序。 我不太了解这个应用程序,因为我的ec-colleague没有太多的信息就把这个给我了。 现在,当我试图build立应用程序显示以下错误

Error 115 Type 'Excel.IExcelDataReader' is not defined. E:\CManager\CManager\\Win764\CManager\MyApp.vb 2376 28 ContributionManager 

我试图得到它的DLL,但没有find任何。

任何人都可以帮助这个…

所以..第一
将参考添加到您的项目到Microsoft.Office.Interop,在COM部分

在你的表格中

  Imports Microsoft.Office.Interop.Excel Imports Microsoft.Office.Interop 

并使用

  Dim xlApp As Microsoft.Office.Interop.Excel.Application Dim xlWorkBook As Microsoft.Office.Interop.Excel.Workbook Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet xlApp = New Microsoft.Office.Interop.Excel.Application xlWorkSheet = xlWorkBook.Sheets("sheet1") 

'在表上写一些string
'和savt它!

  xlWorkSheet.SaveAs("D:\Reports\" & worker & Id & ".xlsx") xlWorkBook.Close() xlApp.Quit() releaseObject(xlApp) releaseObject(xlWorkBook) releaseObject(xlWorkSheet) 

ExcelDataReader

…顺便说一句。 你有没有听说过谷歌thingy;)

删除了现有的DLL并再次添加! 其解决