Cicode Programming Reference > Cicode Function Categories > Dynamic Data Exchange Functions Introduction > DDEWrite


Writes a value to an external Windows application, for example, to an Excel spreadsheet. The value is written once to the application. To write the value dynamically, you need to call this function at the rate at which the data needs to be updated.

Use DDEWrite() to cause CitectSCADA runtime to initiate the DDE conversation with a DDE compliant application running on the same computer.


DDEWrite(sApplication, sDocument, sItem, sValue)


The application name (.EXE filename), for example, "WinWord".


The document, topic, or file name.


A unique name for the item; for example, the variable name, field name, or spreadsheet cell position.


The value of the item.

Return Value

The value that is sent to the other application, or an empty string if the function does not successfully write the value.

Related Functions

DDEExec, DDEPost, DDERead


/* Write the value of a CitectSCADA variable named 
TAGONE to R1C1 (Row1,Column1) of an Excel spreadsheet named 
"Sheet1". The value is in string format. */

See Also

DDE Functions