1. Home
  2. Docs
  3. S7 Excel Connect Support
  4. Write Functions



Write a value to a S7 PLC marker or memory area. This function is available via the taskpane as well as directly via the cell “=SETS7MARKER(…)”


The function returns ‘OK’ when the value is successfully written to the marker or memory area. The funtion returns a specific error message if the value could not be written to the S7 PLC, see the error messages for a description of the returned error message.


cpuType – Specifies the cpu type of the PLC you want to connect with, must be a string with the CPU type in following format: ‘S7-1200’, ‘S71200’, ‘1200’.

ip – Specifies the ip address of the PLC.

rackNo – Specifies the rack number of the PLC, must be an integer between 0 and 99.

slotNo – Specifies the slot number of the PLC, must be an integer between 0 and 99.

dataType – Specifies the datatype of the marker address to write to. The available datatypes depend on the chosen CPU type.

startAddress – Specifies the start address of the requested data, must be an integer between 0 and 9999.

bitNo – Specifies the bit number if the requested datatype is ‘BIT’, must be an integer between 0 and 7.

value – The value that has to be written to the specific marker address, conditions are depending on the chosen datatype.


S7 Excel Connect in Microsoft Excel Showing the SETS7MARKER(...) Formula