Press ESC to close · Ctrl+K to open

WinCC - MS Excel - Office Web Component

WinCC - MS Excel - Office Web Component

We have seen an example a few years ago with Office Web Components, we assume that it is already installed and added to our ActiveX controls in our WinCC project.

The goal is to visualize an Excel sheet within WinCC, with the information it contains.

As we mentioned, the first step is to add the control.

We now have our ActiveX Control, I have changed the name in the properties, I have assigned OWC, which is specific for now when we look at the code.

 

And here we have the code, I have added a line of comment to clarify what we are doing. In summary, we open an Excel file, and copy the content of all the cells that are used. Once copied to the clipboard, we reference our object in WinCC, reference the sheet where we are going to work, and paste the content.

Subsequently, it can be formatted to adjust the column widths and other properties ...

 

The result we obtain is as follows, first we will visualize the content of the Excel sheet, and how it appears in WinCC. Note: Graphs and other controls are not displayed, only data.

 

 

February 11, 2018

"Gratitude in silence serves no one." Gladys Bronwyn Stern