473,421 Members | 1,427 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,421 software developers and data experts.

Excel Object Library(s)??

I want to read/write Excel files but I am having trouble getting started.
Using MS article 302084 as a cookbook, I try to add the reference for MS
Excel Object Library. Two versions are listed, 5 & 11. If I use 11, then then
all references to Excel fail. If I use 5, the next step in the example
fails:

Excel.Application oXL = new Excel.Application() ; //fails

I can do this:

Excel._ExcelApplicationClass xl = null ;
xl = new Excel._ExcelApplicationClass() ;

but I stopped there since I have no documentation, and trying to work
parallel to the example fails.

How do I get started? (VS 7.1, Office Small Business Edition 2003)
Nov 17 '05 #1
3 6407
Hi,

Are you using the primary interop assemblies? Even though they are included in
Office 2003, they are not installed by default (Typical install) and are not
installed when you add a reference to a MS office type library. This could be
the problem with the 11 object library references.

I haven't done Excel automation, but I've done Outlook automation using the
interop assemblies without any problems.

Here is a MS article on the primary interop assemblies for Office 2003:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskInstallingOfficePrimaryInteropAssemblies.asp>

Hope this helps.

Best regards,

Rodger

Time Management Guide - Make better use of your time
<http://www.TimeThoughts.com/timemanagement.htm>

eye5600 wrote:
I want to read/write Excel files but I am having trouble getting started.
Using MS article 302084 as a cookbook, I try to add the reference for MS
Excel Object Library. Two versions are listed, 5 & 11. If I use 11, then then
all references to Excel fail. If I use 5, the next step in the example
fails:

Excel.Application oXL = new Excel.Application() ; //fails

I can do this:

Excel._ExcelApplicationClass xl = null ;
xl = new Excel._ExcelApplicationClass() ;

but I stopped there since I have no documentation, and trying to work
parallel to the example fails.

How do I get started? (VS 7.1, Office Small Business Edition 2003)

Nov 17 '05 #2
> Are you using the primary interop assemblies?

I don't know. How could I tell?
Here is a MS article on the primary interop assemblies for Office 2003:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskInstallingOfficePrimaryInteropAssemblies.asp>


Doing this install had no effect.

Nov 17 '05 #3
Tentatively, explanation found here:
http://msdn.microsoft.com/library/de...eatruntime.asp

Confusion between two namespaces. solution:
using Excel = Microsoft.Office.Interop.Excel;
Nov 17 '05 #4

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
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...
17
by: Ange T | last post by:
Hi there, I'm having pain with the VB behind an Access form. The form is used to create reports in Excel based on the details entered in the form. This has always worked without error on my...
2
by: Alvin Bruney | last post by:
anybody know how to launch desktop excel from a webpage and feed it either a dataset or a file? i've got MS sample code but it aint compiling with the office 10 library. i wonder if they changed...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
4
by: Lisa | last post by:
Hi - I'm able to open excel workbooks and word documents, but I can't seem to copy excel charts, named ranges, etc. to a word document. Anyone know of good reference material in this area? What...
18
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a...
2
by: James | last post by:
I am doing some Excel 2000 automaton using Vb 2005. I am referencing the Excel 9.0 COM Object Library. The following code was working fine: Dim xlApp as new Excel.Application Dim xlWb as...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.