Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.vsnet.vstools.office
external usenet poster
 
Posts: 4
Default calling C# code from excel

"Jason" wrote in message
om...
I'm working on a prototype program and have run into a snag. I am
trying to call some C# code that I have written from within Excel and
can't figure out how to register my methods as macros or formulas
within the excel environment.


Hi Jason,

If you don't like the idea of going down the XLL approach that Geoff
suggested, you should (in theory) be able to do it by building a managed COM
Add-In, but I don't know how to expose the methods from the AddIn to Excel.
Just making them public doesn't seem to help.

Maybe the Excel programming group knows? [added]

Peter

--
Peter Torr - http://weblogs.asp.net/ptorr/
This posting is provided "AS IS" with no warranties, and confers no rights
Samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.vsnet.vstools.office
external usenet poster
 
Posts: 459
Default calling C# code from excel

Your .NET assembly needs a COM interop wrapper and your Excel project
needs VBA wrapper functions to call the functions in your DLL.

--

"Peter Torr \(MS\)" wrote in message ...
"Jason" wrote in message
om...
I'm working on a prototype program and have run into a snag. I am
trying to call some C# code that I have written from within Excel and
can't figure out how to register my methods as macros or formulas
within the excel environment.


Hi Jason,

If you don't like the idea of going down the XLL approach that Geoff
suggested, you should (in theory) be able to do it by building a managed COM
Add-In, but I don't know how to expose the methods from the AddIn to Excel.
Just making them public doesn't seem to help.

Maybe the Excel programming group knows? [added]

Peter

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling VBA code from html or javascript Brent E Excel Discussion (Misc queries) 0 October 16th 08 11:27 PM
Calling a bit of code from a sheet errors gearoi Excel Discussion (Misc queries) 2 September 6th 05 08:21 PM
Calling Match function from code Backslider Excel Programming 2 February 28th 04 03:12 AM
Calling an XLA macro from code Chrissy[_4_] Excel Programming 2 October 11th 03 04:38 PM
Calling HTML Source code from within VBA for Excel Peter Dickson Excel Programming 0 July 9th 03 08:38 PM


All times are GMT +1. The time now is 06:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"