How does a function work?

C

Craig

I have a general Excel question - I'm just curious if
anyone knows (I'm sure you do) how a function technically
works. I'm looking for what actually goes on behind the
scenes.

Take the good ole 'Sum' function, for example. When you
sum a range, does the range get passed to some hidden
module, then returned with a value? Where are these
hidden modules stored? I know that there are some 300
functions in Excel, so there has to be some mad code
hidden somewhere.

Anyway, just curious...

Thanks.
 
H

Harlan Grove

Craig said:
Take the good ole 'Sum' function, for example. When you
sum a range, does the range get passed to some hidden
module, then returned with a value? Where are these
hidden modules stored? I know that there are some 300
functions in Excel, so there has to be some mad code
hidden somewhere.
....

No modules, and not implemented in VBA. If it were, Lotus 123 would still be
the predominant spreadsheet on the market. The built-in functions are
implemented in EXCEL.EXE itself, the Excel executable. It's very likely
written in C or C++, and compiled into object code that's linked with all
the other parts into EXCEL.EXE.

Microsoft isn't about to let you see the Excel source code, but both
OpenOffice and Gnumeric are open source, and there's a high likelihood that
they're not all that different than Excel (aside from legacy bit bashing
nastiness that almost certainly has been in the Excel code from the
beginning).
 
C

Craig

Thanks!
-----Original Message-----

....

No modules, and not implemented in VBA. If it were, Lotus 123 would still be
the predominant spreadsheet on the market. The built-in functions are
implemented in EXCEL.EXE itself, the Excel executable. It's very likely
written in C or C++, and compiled into object code that's linked with all
the other parts into EXCEL.EXE.

Microsoft isn't about to let you see the Excel source code, but both
OpenOffice and Gnumeric are open source, and there's a high likelihood that
they're not all that different than Excel (aside from legacy bit bashing
nastiness that almost certainly has been in the Excel code from the
beginning).


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top