Posts Tagged ‘architecture’
About
XLLoop is an open source framework for implementing excel functions (ie. UDFs) outside the excel process. It consists of two components:
- An excel add-in (XLL) written in C++.
- A server process (there is one written in Java and another written in Erlang).
This provides a mechanism for implementing excel functions in Java and any JVM supported language (and also in Erlang).
The project lives at sourceforge at http://xlloop.sourceforge.net
The add-in and server communicate via TCP sockets, using a binary protocol (for efficiency). The protocol sends and receives variant structures that are very similar to the xloper structure native to excel. There are two types of requests the add-in makes to the server:
- A generic request: This sends the request type as an integer, the request name as a string and then the request arguments as a variant map/struct. The response is a variant of any type.
- A function request: This sends the request type as an integer, the function name as a string and then the function arguments as a variant collection. The response is a variant of any type.
Out of the box, the add-in registers a single function with excel. The function is “FS” (short for function server). This generic function takes a variable number of arguments with the first argument as the function name. The invocation of this function translates to a function request as above. The server responds with a variant result and this is translated into an xloper object, which is then displayed by excel.