XLL+ Class Library

Sample projects

Three sample projects are provided to illustrate the usage patterns of the XllPush library.

The samples can be found under the Samples sub-directory of the XLL+ installation. A set of pre-built binaries can be found in Samples\Bin.

MtCalc demo

The MtCalc add-in demonstrates how you can use XLL+ to write add-in functions that run asynchronously, in a background thread. While the calculation is running, the Excel interface remains available for use. When each calculation is completed, the cell contain the formula updates itself automatically.

The demo function calculates the value of an average-in-average-out equity option using Monte-Carlo simulation, and it can be very slow.

To run the demo, start Excel 97 or Excel 2000, and open the following files, in order:

  1. MtCalcGui.xla
  2. MtCalcDemo.xls

You'll see a number of cells containing "#WAIT!", while the add-in is calculating the results in background. As each calculation completes, you'll see the answer appear in the cell.

While the calculations are running, you can carry on using Excel, editing cells and entering formulae. You don't have to wait for each calculation to complete.

Try changing some of the inputs to the formula, and the new calculation will be added to the queue of calculations

More...

MtBackground demo

The MtBackground add-in demonstrates how you can use XLL+ to write add-in functions that update themselves asynchronously, whenever external data changes, without using DDE. A background thread reads various system data, such as memory in use and disk space available

The add-in provides three real-time data services, via a single add-in function, MtbGet(Topic).

Topic Returns
mem Current total amount of memory in use
C:\, D:\ etc Amount of space available on a local fixed drive
one, two, three, or four A random number, periodically changed

The add-in runs a single background thread, which periodically checks the system status, and generates new random numbers, and posts them to the main thread.

To run the demo, start Excel 97 or Excel 2000, and open the following files, in order:

  1. MtBackgroundGui.xla
  2. MtBackgroundDemo.xls

You'll see that the formula cells are updated periodically. As an added feature, the cells are reformatted to indicate whether a value has increased or decreased.

You can stop and start the real-time update using the Paused item on the MtBackground menu (next to the Tools menu on Excel's main application bar).

More...

MtFeed demo

The MtFeed add-in demonstrates how you can use XLL+ to add a data-feed to Excel. External data can be displayed in normal formula cells, that update themselves asynchronously, whenever external data changes. There is no need to use DDE.

This demo uses a real-time data server application to broadcast canned data to any number of clients (on the same machine).

To run the demo, do the following, in order:

  1. Start MtFeedServer.exe
  2. Start Excel 97 or Excel 2000
  3. Open MtFeedAddinGui.xla
  4. Open MtFeedAddinDemo.xls

You'll see that the formula cells are updated periodically. The cells are also reformatted to indicate whether a value has increased or decreased.

You can stop and start the real-time update using the Paused item on the MtFeed menu (located on Excel's main application bar).

You can examine which cells are connected to what topics by clicking the Connections item on the MtFeed menu.

Try starting a second copy of Excel, and open MtFeedAddinGui.xla and MtFeedAddinDemo.xls. Notice that both instances of Excel update simultaneously.

More...

Next: MtBackground sample >>