vb .net and Excel 2000

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Hello,

I use the following code to make an Excel-file, which works fine with
Excel 2003 (and the MS Excel 11.0 object library):


Dim Excel As New Excel.Application
Dim oBook As Excel.Workbook
Dim WSheet As New Excel.Worksheet
WSheet = Excel.Workbooks.Add.Worksheets.Add
Excel.Visible = True
etc ...

With Excel 2000 (and the MS Excel 9.0 obj lib), however, i get an error
on the line
-> Dim Excel As New Excel.Application

Error: Server execution failed

does anyone have an idea? I probably don't have the right references or
so. Has anyone experience with VB .NET and Excel _2000_ ?

Thanks,

Steven
 
Hi Steven

I have an app that uses Excel 2000. Here is an example of my code and refferences

Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = CType(excelBook.Worksheets(1), Excel.Worksheet)

I refference:
Excel.dll 9.0
Office.dll 9.0

Hope this helps.
BrianDH
 
Back
Top