Introduction
Method
By using a VBScript action (e.g. on a button) you can create an object to access the Excel application and workbooks. The code below creates a connection and then sets the value of a chosen cell. "CellonExcel" and "ExcelSetPoint" are the only CX-Supervisor points requiring definition as text points:
' Launch Excel
set
app = createobject("Excel.Application")
' Load a workbook
set wb = app.Workbooks.Open(s_ProjectPath + "\excelsheet.xls")
'define the cell you wish to use
set rng = wb.Activesheet.Range(CellonExcel)
'apply the value to the cell
rng.value = ExcelSetPoint
'Save, close, quit and tidy up - to avoid Excel hanging around in background
app.ActiveWorkbook.Save
app.Workbooks.Close
set rng = nothing
set wb = nothing
app.Quit
set app = nothing