Wincc flex 2008 and excel

Yes it is.
When you open it from a script you can write data too it and retrieve data.
You can also open it by attaching the "run program" function to a button.
Then set the program parameter to "MS EXCELL.exe" , and the parth to your files path.
 
Last edited:
Do you maybe have example? I also send siemens a mail (see below). Is it possible to bring the excel file to the front if there's a alarm? I need the alarm window in the front if there's a alarm. But the alarm window works only if wincc is in the front of the panel. So i looked for a other option.

This is the mail from Siemens. They asking 500 units of our avc card :). Funny...
But you can log the alarms in a *.csv or *.txt.
Then you can use a script with "StartProgram" to open the *.csv or *.txt log data.
>>> But please attend, you must have a look that you don´t have thrashing, if you to often/fast open the log data.

If you would like to use the option with alarm log & script and you need help, then I can give this case to our Extended Support. They will help you or project you this script with log. This Extended Support will cost 500 units from AVC card.
 
I will try and make you a sample , of how to open close a excel file and how to write data to it..
What kind of data do you want to write to this file?
 
Hey LestatZA :p, i only need to send the alarms that are visible in my alarm window. So if there is a alarm, then i need to send this alarm to the excel file or .txt file and then a need to open this in the front of the screen. I think i got 50 alarms. For this i probably need to make a alarm log i think, am i wright. Thanks verry verry much!!! If i can help you with something you can always ask me!!!!

Grtz
 
Attached is a text file with two scripts.
The first check if a file exists if not it creates it and the write via a text stream into the file.
The second opens a .xls file then you can read and write to it.


you will have to create a folder on your C: drive called Test
Copy and paste the two examples into two separate scripts in wincc

Hope this helps
Good luck
 
LestatZA....i have read your 2nd script. i can see Read from Cell (1,1) that is used to read data from excel. But what i have to do to write some of the tag values in different cells of excel???
Thanks & Regards
 
LestatZA....i have read your 2nd script. i can see Read from Cell (1,1) that is used to read data from excel. But what i have to do to write some of the tag values in different cells of excel???
Thanks & Regards

Hi fhad.shabbir

All you have to do is use the following command:
To change data:
xlSheet.cells(1,1).Value = "Your Value"
To Change Font:
xlSheet.cells(1,1).Font.Bold = true
To change size:
xlSheet.cells(1,1).Font.Size = 18
To change font colour:
xlSheet.cells(1,1).Font.ColorIndex = 3

I hope this will help.
 
Image from winCC flexible to Excel

Dear LestatZA, Thanks alot! it really servrd the purpose. Do me another favour please. Can i move any image from winCC flexible to a specific cell in Excel? If yes please provide me the command for that.
 
Hi fhad.shabbir

I have never tried to do this in VBS, but I assume it will be something in the line of the following:

xlSheet.cells(1,1).Pictures.Insert(pPath) //Where pPath= URL of Picture

I did not have time to try this, so please let us know if this worked or if you found another solution.
 

Similar Topics

Hi, I have WinCC Felxible 2008 SP5 installed on my Windows 10. I want to program Simatic panel TP177B using USB transfer cable. But i can't...
Replies
8
Views
2,131
Hello! Another weird request from the swede with customers that doesn´t like to pay for quality in first place... Is there any way to have a...
Replies
8
Views
2,688
Hi! I'm a little lost here. I have made a script in VB that run perfect when I simulate it on my programming machine (Windows 8.1) But when I...
Replies
9
Views
2,799
Hi! Writing this in a hurry. Today we made a break at a factory and I should download new s7-1200 program and a new WinCC Flex 2008 RT program...
Replies
0
Views
2,249
hi guys,,can i personalize data logging in wincc flex? i mean i want to make a table that shows log data in a better platform than in wincc,,,i...
Replies
1
Views
1,434
Back
Top Bottom