| Dettagli del download |
|
ExportImportXLS is a project designed to demonstrate how to access MS Excel files via the COM interface (the MS Excel application has to be installed on the same computer as the Reliance SCADA/HMI system). The Var_Float, Var_Int, and Var_Str tags defined through the Device Manager are linked to the corresponding Display components in the main visualization window (the Enable setting value option is active). The values of these tags are exported/imported from/to an *.xls or *.xlsx file. The ExportToExcel and ImportFromExcel event scripts (activated by pressing the respective button in the visualization window) are defined through the Script Manager. The Excel file named Values is located in the <Project> folder. At the beginning of the ExportToExcel script, an instance of the "Excel.Application" object is created. Afterwards, a new workbook (WorkBook) and a new worksheet (WorkSheet) are successively created. The Cells method is used to write the data to the required cells. The workbook is stored by calling the SaveAs method and all created objects are released from memory. At the beginning of the ImportFromExcel script, an instance of the "Excel.Application" object is created and the Values file is opened with the Open method of this object. The values stored in the file are loaded via the Cells method. |
|
|||||||||||||||||||||||||||||||||

Gli esempi presenti su questo sito sono stati liberamente inviati dagli utenti di automationforum.it, è stato espressamente specificato loro di inviare solo esempi FREE. Automationforum.it non si ritiene responsabile dell'eventuale presenza di esempi rilasciati sotto licenza commerciale, Automationforum.it invita tutti coloro che individuano esempi rilasciati sotto licenza commerciale presenti in questa raccolta a segnalarlo dall'apposito