0

I have a vb.net application with excel export and import. I am not much familiar with this application as my ec-colleague left this to me without much information. Now when i am trying to build the application its showing the following error

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

I tried to get its dll but couldnt find any.

Can anybody please help on this...

TechNo
  • 615
  • 2
  • 7
  • 24

3 Answers3

1

so.. first
Add Referente to your Project to Microsoft.Office.Interop, in COM section

in your Form

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

and use

    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")

'write sometring on sheet
'and savt it !

   xlWorkSheet.SaveAs("D:\Reports\" & worker & Id & ".xlsx")

    xlWorkBook.Close()
    xlApp.Quit()

    releaseObject(xlApp)
    releaseObject(xlWorkBook)
    releaseObject(xlWorkSheet)
CristiC777
  • 481
  • 11
  • 20
0

ExcelDataReader

...btw. Have you ever heard of that google thingy ;)

David Sdot
  • 2,343
  • 1
  • 20
  • 26
0

Removed the existing dlls and added once again! its resolved

TechNo
  • 615
  • 2
  • 7
  • 24