Follow the steps below to build and run the sample applications.
Build the sample applications
To build the samples, open the solution file samples\DemoFeed\DemoFeed.sln in Visual Studio, and build the solution.
Note that all the executable files for each project are built to the same directory – either DemoFeed\Debug or DemoFeed\Release, depending on the build.
Running the feed server
Once the samples are built, start the feed server as follows: At the command-line, navigate to the directory containing the executables and type DemoFeed, e.g.:
cd "C:\Program Files\Planatech\XllPlus\6.0\VS9.0\samples\DemoFeed\Debug"
DemoFeed
The server will run until you kill it by pressing Ctrl+C.
Starting the Excel add-in
To start the add-in for the first time under the debugger, build the Debug build, and then:
-
Open FeedAddin\FeedAddin.cpp.
-
Go to the XLL Add-ins window. (If it is not visible, use the menu command View/Other Windows/XLL Add-ins to show it).
-
On the Tools menu in the XLL Add-ins window, click Set up Debugging.
You can then debug the add-in at any time by pressing F5.
Alternatively, you can open either build (debug or relase) of the add-in file FeedAddin.xll in Excel using File/Open, or you can add it to Excel using Tools/Add-ins....
Test data
You will find some large spreadsheets containing test data in the TestData sub-directory.
Start the DemoFeed server application (see above).
Start Excel. If you have not registered FeedAddin.xll using Tools/Add-ins..., open the add-in.
Open TestData\PublishLargeDataSet.xls. If the buttons in the workbook are disabled, you should enable macros for the workbook. Click on the Publish values button.
Start a second copy of Excel. If you have not registered FeedAddin.xll using Tools/Add-ins..., open the add-in.
Open TestData\ShowLargeDataSet.xls.
Rearrange the Excel application windows so that you can see both at the same time.
In PublishLargeDataSet, click on Increment & Publish. Note that the data in ShowLargeDataSet is updated, including the vectors under "Series" at the right of Sheet1.
You may find it useful to investigate the VBA code in PublishLargeDataSet.xls. Note that ShowLargeDataSet.xls contains no macros, just formulae.
Tuning
You can adjust the responsiveness of the data feed add-in by changing the Excel Application.RTD.ThrottleInterval setting.
In Excel, go to the Visual Basic for Applications window (Alt+F11) and open the Immediate window (press Ctrl+G).
You can see the current setting - in milliseconds - by entering the line below:
?Application.RTD.ThrottleInterval
You can set the throttle interval to 1/10 of a second by entering the line below:
Application.RTD.ThrottleInterval = 100