XLL+ Class Library

XllDriver Class

[VB]
Dim o As XllDriver

Overview

The XllDriver class acts as a stand-alone host for XLLs.

Before it can be used, Initialize should be called. LoadXll should be called for each XLL that contains add-in functions. An add-in function can be invoked using CallAddinFunction or CallAddinFunctionA. When the XllDriver is no longer needed, Terminate should be called.

Usage

XllDriver is a global object; only one instance of XllDriver exists within any process. Therefore (in Visual Basic) you can use the global instance in place of a variable, thus:

XllDriver.Initialize
XllDriver.LoadXll MyXllFile, TRUE

Emulators

Some XLL add-ins make use of native Excel functions and macros, using the Excel4() and Excel4v() APIs. The XllDriver uses a set of emulators to simulate the results of these calls. Each emulator must support the IExcelEmulator interface.

If the XLL you wish to use makes use of any native Excel functions that are not supported by the emulators built into XllDriver, you can write your own class that implements IExcelEmulator and register it using InstallExcelEmulator. If the XLL uses Excel API functions during its initialization phase (i.e. in response to a call to xlAutoOpen) then you should install the emulator before you call LoadXll.

Requirements

Library: pslxld01.dll

See Also

XllDriver Methods | IExcelEmulator interface