473,385 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

vb .net and Excel 2000

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
Nov 20 '05 #1
1 2154
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
"Steven" wrote:
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

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dean Bortell | last post by:
This code runs fine on win xp and office xp: string sheetPassword = "Senior1993"; string sheetToOpen = "NewRpt1c.xls"; Excel.Application excelApp = new Excel.Application();...
1
by: Benjamin | last post by:
I am making a Windows EXE (.NET Visual Basic Windows Application). I would like to make it possible to open Excel Worksheets from my EXE. This should work independent of Excel version on client...
4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
0
by: Dent | last post by:
I am having a problem with a program that I wrote to format an Excel spreadsheet. I wrote the program on a WinXP/Office XP/Visual Studio .NET 2003 computer. I am using late-binding. When I try...
17
by: Mansi | last post by:
I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi
2
by: David Reynolds | last post by:
Hi Everybody, I have a vb.net webform where I create the Excel application/workbook/worksheet. On Windows 2000 server for some reason, I keep getting an error("Bad variable type") when trying...
3
by: Michael Kellogg | last post by:
My application works with Excel to put together spreadsheets for reporting purposes. It runs just fine on my box, but when I put it on another one, it bombs. Here is the relevant code: ...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
4
by: =?Utf-8?B?THluZXJz?= | last post by:
Hello All, We have a VB.NET application writen using VS 2003. This application apens an excel file from a vendor, reads the data and performs whatever functions it needs. We recently upgraded our...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.