Question:
When using Elipse SCADA, can Excel files be opened, saved, and closed via scripts?
Solution:
Yes; this is possible via ShellExecute function, which is found in the Global Manager via AppBrowser.
To open the spreadsheet:
ShellExecute(“open”, “Book1.xls”, “”, “”,1 )
To save the spreadsheet:
DDEExecute(“Excel”,”Sheet1″,”[SAVE()]”)
To close only the spreadsheet:
DDEExecute(“Excel”,”Sheet1″,”[CLOSE()]”)
To finish the process, just execute a program that closes this open program via a command line, and with this you will be able to use Elipse SCADA’s Execute command.
Example:
Execute(“C:\PSTools\pskill -t EXCEL.exe”)
In this example, we used the software PsKill, a Microsoft sysinternals’ tool.