Example: Excel
Differences between apps like Excel and Visual Basic
All of Microsoft's Office applications support Visual Basic for Applications (VBA). Many other office-type tools as well as scientific applications support some sort of scripting language that is ActiveX-aware.In contrast to the 'real' Visual Basic, however, these languages are interpreted only and not compiled. This means that they query the ActiveX automation server at runtime for its properties and methods. Maybe they do not provide an Object Browser as shown in the Visual Basic example. In that case you can usually still create an "EpicsCAServer.ProcessVariable" and call e.g. "SetValue". You cannot, however, see the method definitions at design time.
Excel does support the Object Browser, so the code is checked at design time. This example shows support for a spreadsheed-cell that responds to 'put' requests:
![]()
Note how in the above example, a CA 'put' is caught by Excel. It leads to an update of the spreadsheet cell. It is not followed by a 'PV.SetValue value_received', though, so the value of the PV stays at 0!.
Don't!
Yes, you could build an IOC based on Excel. But think again.