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 / Visual Studio.NET / VS Tools for Office / April 2007

Tip: Looking for answers? Try searching our database.

Need help calling C# dll method from excel 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
targus - 14 Apr 2007 01:38 GMT
I have a C# CLR library with a single method.  My boss wants to call
that method from within Excel 2003.  Can someone provide some bare
minimum class because I can't figure it out.  I just need to expose
the method in Excel - how hard can that be?

I'm a newbie to the world of Office tools.  I never did much VBA and
rarely came face to face with Excel.

I'm using VS 2005.  I installed VSTO and VSTO SE and am able to open a
couple of sample projects ("CapitalExpenditure" and "foodmart
Analyzer").  I also can create a new project in VS choosing  "2003 Add-
ins" "Excel Add-in" but still nothing jumps out at me.

Please help
Bryan Phillips - 14 Apr 2007 04:18 GMT
How does the boss want to call your method?

If it is from VBA, then don't use VSTO rather make your assembly visible
to COM.

If it is from a menu item or toolbar button, then use VSTO and in the
Connect class for the add-in, add the menu item or button and create an
event handler which will call your method.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com
Web Site:  http://www.composablesystems.net

> I have a C# CLR library with a single method.  My boss wants to call
> that method from within Excel 2003.  Can someone provide some bare
[quoted text clipped - 10 lines]
>
> Please help
targus - 17 Apr 2007 20:18 GMT
On Apr 13, 8:18 pm, "Bryan Phillips"
<bphill...@nospam.spamcop.net.spammenot> wrote:
> How does the boss want to call your method?

He wants to call it from a within a cell in a manner similar to a
built in function.  Like "=function(p1,p2)"

--
Targus
Bob Eaton - 22 Apr 2007 06:46 GMT
Check out:

http://blogs.msdn.com/eric_carter/archive/2004/12/01/273127.aspx

Bob

> On Apr 13, 8:18 pm, "Bryan Phillips"
> <bphill...@nospam.spamcop.net.spammenot> wrote:
[quoted text clipped - 5 lines]
> --
> Targus

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.