WINCC: button to open a xls-file

I have done this using a C script to open a CSV using Excel. I had to repeat it so it would work with Excel XP or 2003.

#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
ProgramExecute("C:\\Program Files\\Microsoft Office\\Office10\\EXCEL.EXE C:\\AC1Total.csv");
ProgramExecute("C:\\Program Files\\Microsoft Office\\Office11\\EXCEL.EXE C:\\AC1Total.csv");

}

 
test

I tried this behind a button:

#include "apdefap.h"
void OnLButtonDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)
{
ProgramExecute("C:\Program Files (x86)\Internet Explorer\iexplore.exe");
}

No Explorer called, when I enter this C:\Program Files (x86)\Internet Explorer\iexplore.exe in the windows command line, than it opens.
I guess the C script does not work.

Kind regards,
G
 

Similar Topics

I was looking for this function, so that i doesn´t need to do it in the PLC. If there are an alarm in the alarm list, i want to flash the...
Replies
2
Views
540
On my HMI (KTP1200), I've got this button "Generate Report", which generates a report (CSV) when it's pressed. (see pic) While it's being...
Replies
1
Views
555
I've got this start screen where the user has to enter their username and password. The username and password feature works fine. However, I want...
Replies
7
Views
1,456
Hello to everyone. I change the value of a "PQW" with a button in Wincc flexible. The code of the button is defined as M102.0. Value reset...
Replies
10
Views
4,587
So i am trying to learn new techniques in programming when work is slow so i can improve myself in this world. I just found out about multiplexing...
Replies
0
Views
1,005
Back
Top Bottom