14.2.4.1        DDE Script Examples

Example 1 -    Send value of tag named Text50 to EXCEL spreadsheet cell named REALDATA, EXCEL must be running and a single Workbook opened.

set x [GETVAL text50]

DDEPOKE "EXCEL|Sheet1!REALDATA=$x"

 

Example 2 -    Send value of analog1 to EXCEL workbook named Book1.xls, cell named REALDATA.                       

set x [GETVAL analog1]

DDEPOKE "EXCEL|Book1.xls:Sheet1!REMOTESP=$x"

 

Example 3 -    Get value from EXCEL spreadsheet from cell named RSP. EXCEL must be running and a single Workbook opened.

DDEREQUEST "text70=EXCEL|Sheet1!REMOTESP"

                  

Example 4 -    Get value from EXCEL spreadsheet from cell named RSP in workbook namedBook1.xls            

DDEREQUEST "text70=EXCEL|Book1.xls:Sheet1!REMOTESP"