Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

How to create my own interop assembly?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mansi - 05 Oct 2004 19:49 GMT
Hi,

I'm trying to automate excel 2000 from c# .NET.  I also need for my code to
work on Excel 2000 and 2003.  Since there are no PIAs available for office
2000, what steps do I need to follow to create my own interop assembly for
excel 2000.  I'm assuming that once I link to this interop assembly, it will
work with the later versions of excel?

It's mentioned in one of the posts that you can use Excel09.obj to create a
dll using
TlbImp Excel9.olb Excel.dll.,  but what are the steps to do this?  

Thanks.

Mansi
Mattias Sj?gren - 05 Oct 2004 21:08 GMT
>It's mentioned in one of the posts that you can use Excel09.obj to create a
>dll using
>TlbImp Excel9.olb Excel.dll.,  but what are the steps to do this?  

That should be the only step required. After that you just reference
the generated assembly.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Mansi - 06 Oct 2004 06:01 GMT
Just to give you some backgroud info, I'm trying to automation excel from c#
.NET.
I need to be able to export to excel 2000, 2002, 2003.  I will install
excel 2000 and then reference the assembly generated using "TlbImp Excel9.olb
Excel.dll" in my c# .NET code.

Once I reference the generated assembly, I'm assuming that I can create
objects using early binding?  Is this true?

Also, should the interop assembly I generate for excel 2000 work with excel
2002 and 2003?

Thanks.

Mansi

"Mattias Sjögren" wrote:

> >It's mentioned in one of the posts that you can use Excel09.obj to create a
> >dll using
[quoted text clipped - 4 lines]
>
> Mattias
Mattias Sj?gren - 06 Oct 2004 19:19 GMT
>Once I reference the generated assembly, I'm assuming that I can create
>objects using early binding?  Is this true?

Yes.

>Also, should the interop assembly I generate for excel 2000 work with excel
>2002 and 2003?

I believe so, yes. See

INFO: Writing Automation Clients for Multiple Office Versions
http://support.microsoft.com?kbid=244167

How To Use Visual Basic .NET for Binding for Office Automation Servers
http://support.microsoft.com?kbid=302902

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Heath Stewart [MSFT] - 07 Oct 2004 10:03 GMT
For the most part, typelibs (or rather, their implementations) are
backward compatible. COM guidelines dictate that you don't change
managed interface (instead you derive new ones), CLSIDs stay the same,
etc. With Office, these rarely change. As long as the 2000
implementations suit you they should be supported in most cases in 2002
and 2003.

Signature

Heath Stewart
Software Design Engineer
Developer Division Sustained Engineering
Microsoft Corporation

Mansi - 08 Oct 2004 05:53 GMT
Thanks for the info.

I know this next question should be posted in another discusssion group, but
I need to be able to export a picture/image file from c# to excel.  Is there
any way to do this?

Mansi

> For the most part, typelibs (or rather, their implementations) are
> backward compatible. COM guidelines dictate that you don't change
> managed interface (instead you derive new ones), CLSIDs stay the same,
> etc. With Office, these rarely change. As long as the 2000
> implementations suit you they should be supported in most cases in 2002
> and 2003.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.