Worksheet functions using C#

  • Thread starter Thread starter vincent
  • Start date Start date
V

vincent

Hi,

Is it possible to write a Worksheet function using C# in Excel. I am using
OfficeXP.

When I use VB6 to create a component, I can create something like this:

=MyQuote()

But when I tried to create one using C# with com interop, it does not seems
to work. Has anyone does this before?

Thanks
Vincent
 
vincent said:
Is it possible to write a Worksheet function using C# in Excel. I am using
OfficeXP.

When I use VB6 to create a component, I can create something like this:

=MyQuote()

But when I tried to create one using C# with com interop, it does not seems
to work. Has anyone does this before?

Ambiguous. Do you mean VB6 as in the separate Visual Basic 6 development
system which you could use even if you didn't have Office? If so, then
presumably you're creating XLLs or COM add-ins, which VB6 can do because it
can produce stand-alone executable code. As I understand it, C# is like
Java, and it compiles to intermediate code to be run by a virtual machine.
I'd guess it's possible in theory to write a pass-through add-in in VB6 or
VC++ that could interface with Excel and the VM that runs the C# code.

On the other hand, if you mean VBA6 that's part of Office, then that's the
*only* scripting facility (well, other than lingering XLM support) Office
provides. No built-in support for C# or Perl or Java or anything else.
 
Back
Top