xlld.wrap.traits

This module implements the compile-time reflection machinery to automatically register all D functions that are eligible in a compile-time define list of modules to be called from Excel.

Import this module from any module from your XLL build and:

import xlld;

mixin(implGetWorksheetFunctionsString!("module1", "module2", "module3"));

All eligible functions in the 3 example modules above will automagically be accessible from Excel (assuming the built XLL is loaded as an add-in).

Members

Enums

Async
enum Async

UDA for functions to be executed asynchronously

Functions

dllDefFile
DllDefFile dllDefFile(string libName, string description, Flag!"onlyExports" onlyExports = No.onlyExports)

Returns a structure descripting a Windows .def file. This allows the tests to not care about the specific formatting used when writing the information out. This encapsulates all the functions to be exported by the DLL/XLL.

generateDllDef
void generateDllDef(string[] args)
getAllWorksheetFunctions
WorksheetFunction[] getAllWorksheetFunctions(Flag!"onlyExports" onlyExports = No.onlyExports)

Gets all Excel-callable functions from the given modules

getModuleWorksheetFunctions
WorksheetFunction[] getModuleWorksheetFunctions(Flag!"onlyExports" onlyExports = No.onlyExports)

Gets all Excel-callable functions in a given module

getWorksheetFunction
WorksheetFunction getWorksheetFunction()

Take a D function as a compile-time parameter and returns a WorksheetFunction struct with the fields filled in accordingly.

implGetWorksheetFunctionsString
string implGetWorksheetFunctionsString()

Implements the getWorksheetFunctions function needed by xlld.sdk.xll in order to register the Excel-callable functions at runtime This used to be a template mixin but even using a string mixin inside fails to actually make it an extern(C) function.

Mixin templates

GenerateDllDef
mixin template GenerateDllDef(string module_ = __MODULE__)

Structs

DllDefFile
struct DllDefFile
Statement
struct Statement

Templates

isSupportedFunction
template isSupportedFunction(alias F, T...)

Whether or not this is a function that has the "right" types. T are all the types that are valid return or parameter types. void is a special type that is always valid for the return type of the function.

Meta