AdvancedHMI Software
General Category => Support Questions => Topic started by: Allan19111911 on July 24, 2016, 06:48:31 PM
-
Is there a way to get data logger2 to overwrite one group of cells instead of adding another row? If i can get it to do that i can automate excel to send emails based on certain conditions. i have that part mostly figured out.
thanks
Allan
-
You can do it with a DataSubscriber and a little code:
- Add a DataSubscriber to the form
- Set PLCAddressValue to a address in the PLC
- Double click the DataSubscriber on the form design view. It will take you back to the code
- Enter code something like this:
If e.ErrorId = 0 Then
Using sw As New System.IO.StreamWriter(".\MyLogFile.txt", False)
sw.WriteLine(e.Values(0))
End Using
End If