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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.