The information in this article applies to:
SUMMARY
The sample code provided contains a template that can used for writing
32-bit Microsoft Excel XLLs for Windows. This code demonstrates many of the
features of the Microsoft Excel C API. This sample was updated from the
Microsoft Excel Developer's Kit, version 5.
Frmwrk32.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. MORE INFORMATIONCreating Stand-alone DLLs (XLLs)Microsoft Excel supports stand-alone DLLs. These are DLLs (or code resources) that the user opens by choosing Open from the File menu and selecting a DLL file or by using the Microsoft Excel Add-In Manager. The user can also put DLL files in the Microsoft Excel Startup directory so that they are opened at run time. By convention, stand-alone DLLs are called XLLs. After the DLL is built, the DLL should be given a filename with the extension .XLL. When using an XLL, the user never sees a macro sheet or Add-In sheet. Therefore, an XLL must be able to do everything an XLA (Add-In) can do. In particular, XLLs need a way to provide functions that run automatically at open time, close time, and so on. When developing an XLL, you need to:
The Generic Template for XLLsThe sample code provided contains a template you can use for writing your own 32-bit Microsoft Excel XLLs. This code demonstrates many of the features of the Microsoft Excel C API. To see the generic Add-In code, open GENERIC.C from the sample. When the compiled generic Add-In, GENERIC.XLL, is opened in Microsoft Excel, it creates a new Generic menu with the four Commands listed in the following table:
The generic Add-In also provides two functions, Func1 and FuncSum, that can be used whenever the generic Add-In is open. These functions appear in the Generic Add-In category in the Function Wizard. Also, these functions can be registered without loading all of the generic Add-In. To do this, use the following formulas:
To BuildThis project must be built as a 32-bit application. NMAKE can be used with the attached makefile to build this project.REFERENCESMicrosoft Excel Developer's Kit, version 5. Additional query words:
Keywords : kbfile kbsample kbusage |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |