Thread: Excel "Add Ins"
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Excel "Add Ins"

Hi Bob & Bart,

With my particular UDF's I only find a relatively small performance increase
by processing in a VB6 ActiveX dll. Obviously this observation only applies
to my own functions and my method of implementation. FWIW the dll only does
calculations like x = y * 2, albeit fairly intensively. Not object model
things like x = Range("A1") * 2.

Possibly I'm not doing things as efficiently as I might, in particular my
UDF's exist in the first place in a normal addin like this -

UDF's in a normal addin module. First do a few pre-checks on inputs, eg
check if a input is "acceptable", is it an array, etc. Pass inputs to my dll
function to process, then the addin UDF returns result or an array of
results.

Could I do this more efficiently ?

A bit more info - the dll itself is a full app. It uses for other purposes
the same functions exposed to the UDFs. Instancing for dll class referenced
by the addin UDF's is GlobalMultiUse, so the dll functions are called
directly by the addin functions.

Regards,
Peter T

"Bob Phillips" wrote in message
...
I agree with Bart on the ActiveX DLL, it is the easiest to get up an
running, VB being similar enough to VBA to make it straightforward.

As well as looking at the formulae, check whether any intermediate
calculations can be used , rather than repeat long calculations many

times.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"RB Smissaert" wrote in message
...
Putting the code in a VB6 ActiveX dll can make it faster as well and has

the
benefit that it is very easy.
The other thing is to look at are the functions themself and see if they

can
be speeded up.
Maybe it is worth to post them here.

RBS

"Ben" wrote in message
...
Hi There

I need to add some User Defined Functions to Excel 2003 - the

functions
are
CPU intensive.

The existing spreadsheet has the functions written in Excel VBA (as an

XLA
add in), and they are very slow.

What are my choices ? Is this correct:
(1) Write an XLL in C++
(2) Write a COM Add in in C++
(3) Write a COM Add in in C#
(4) Write an Automation Add In in C#

Has anyone done any comparisons on the performance of XLL's in C++

versus
Automation Add Ins in C# ? I suppose C# is a great deal slower

because
of
the Interop ?

TIA