0

hi
im creating an application that query data from fox pro, manipulate it and export it to excel.
here is the code im using to creat excel object:

Dim oExcel As New Excel.Application
Dim obook As Excel.Workbook = oExcel.Workbooks.Add

im getting excell.application underlined(error msg:new cannot be used on an interface)
it get fixed when i remove New, but now im getting oExcel in second line wiggly underlined(er msg;variable oExcel is used before its been assigned a value)
can anyone help plzzz??
thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by TomW
0

wrong library ref was enterd and its setting interface object which cannot be of type new

0

You dont need to automate Excel at all to output your dataset/datatable to an Excel file. You can use OLEDB to create your file.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.