Publishing data

The data model and events are all that matter when working across machines or applications.

Start by opening 1 or more Excel instances running in the same or different machines and type this formula:

=P(“A_SYMBOL”,”A_FIELD”,”FEED”)

The formula basically will monitor field A_FIELD from symbol A_SYMBOL. Now we create a IronPython program that 'writes' into that field making any listeners to receive an update.

sys.path.append('c://Python24//Lib') # CPython module random is used 
import clr, sys, time, random
 
clr.AddReference("qlnet") # QuoteLink's assembly
from qlnet import Link
from qlnet import Node
 
ql = Link()
 
print " Ctrl - C to exit \n"
while True:
   ql.Quotes['MYFEED']['A_SYMBOL']['A_FIELD']= random.randint(0, 200)
   time.sleep(1) # sleep 1 sec

Quotes is a Link node property that returns the quotes root. Note that indexing a sub-node works always - if the node does not exist it is simply created.