From: <eri...@us...> - 2008-06-01 14:15:16
|
Revision: 547 http://xlw.svn.sourceforge.net/xlw/?rev=547&view=rev Author: ericehlers Date: 2008-06-01 07:15:24 -0700 (Sun, 01 Jun 2008) Log Message: ----------- update docs Modified Paths: -------------- branches/R030000f0-branch/xlw/docs/pages/faq.txt Modified: branches/R030000f0-branch/xlw/docs/pages/faq.txt =================================================================== --- branches/R030000f0-branch/xlw/docs/pages/faq.txt 2008-05-28 10:12:43 UTC (rev 546) +++ branches/R030000f0-branch/xlw/docs/pages/faq.txt 2008-06-01 14:15:24 UTC (rev 547) @@ -3,6 +3,16 @@ \page faq Frequently Asked Questions +\section faq_new New FAQ + +These are FAQs that have arisen since the release of XLW version 3.0. + +- \ref NumArgs + +\section faq_old Old FAQ + +This is the original FAQ that accompanied XLW version 1.0. + - \ref WhenCom - \ref WhenNotCom - \ref IsItCpp @@ -10,6 +20,28 @@ - \ref diffxlldll - \ref sr1 +\section NumArgs How Many Arguments Are Supported For Addin Functions? + +Excel 2007 (and XLW 3.0) support user defined functions with up to 255 +arguments. + +Excel versions up to and including 2003 have a limit of 30 function arguments. +But there is an effective limit of 20 arguments for user defined functions. +This is because you must register your function by calling xlfRegister, which +is itself limited to 30 arguments. xlfRegister uses 10 of its arguments to +register the function, leaving 20 slots for the descriptions of the arguments +to your addin function. XLW ought to raise an exception on an attempt to +register a function with more than 20 arguments under Excel <= 2003, but it +doesn't - the error is forwarded to Excel, which silently fails to register +the function. + +It is in fact possible to register a user defined function with up to 30 +arguments, by omitting descriptions for arguments beyond the 20th. The 21st +and later arguments are valid but appear in the Function Wizard with no +descriptions. XLW doesn't support this trick. + +The limit can be circumvented in any case with an argument list. + \section WhenCom When should I use COM? The COM interface based on former OLE 2.0 offers a different approach than the one used by the C API. A full discussion is beyond the scope of this document This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |