It works that easy: Write Excel files with the Siemens S7
Unfortunately, it is not possible to write real Excel files with a Siemens S7. In this article, we will show you how you can still achieve your goal and create first-class xlsx documents with your PLC.
It's that easy:
Create real Excel files with an S7 PLC
In this context, Siemens likes to refer to the possibility of creating “Excel-compatible” files with the help of WinCC. What is meant here are CSV files. These are a relic of the last century. They do not offer much more than a line-based storage of values. It is possible to import them into Excel, but the result is far from attractive.
But nowadays, customers expect a proper layout in the form of a real Excel file (xlsx). Sometimes they even make concrete specifications regarding logo, colours, or fonts.
But don’t worry, we have found a good solution for this task.
Forget about CSV
Only real Excel files can do that
Formulas or charts are often used. Thus, it is easy to design an Excel template with a measured value representation in the form of line or bar charts. In addition, Excel offers a whole range of other features that are only possible with real Excel files.
The result could for example look like this:
Advantages of Excel files over CSV files
How to create Excel files with the S7
With our software DataSuite 3 (formerly SPSDataReader), you can easily create these and other Excel files with your Siemens S7 PLC. The program reads data blocks (DB) from your S7 and creates real Excel files from them. Your controller can read and write an unlimited number of different Excel files. In the same way, several controllers can also write to one file.
You don’t need WinCC, an installed Excel program or an OPC server. Just install DataSuite on a PC with Ethernet connection, configure, done. This is how easy it is to write Excel data with an S7 controller. You can find a free 30-day trial version here: DataSuite trial
Configuration in DataSuite
It is actually as simple as it sounds. After installing DataSuite, you can create an Excel file and configure it. DataSuite can read and write Excel files, but here we will focus on the writing process.
First, you need to create an Excel file where the values should be written. To do this, click on the “Excel files” menu option. Then click on “Create new file”, the number of possible files is unlimited. Now you can create an xlsx file, which you can configure on this page:
Once you have successfully created and configured the file, you can create a trigger. A trigger triggers under certain conditions and then executes a desired action.
Since we want to write an Excel file with the Siemens S7, click on “Trigger” on the left and edit the trigger “Write data record”.
Now you can freely configure the trigger and assign Excel cells to S7 variables. Of course, you can also add more actions in the trigger. We have already prepared the most important machine applications with Excel files for you. Choose your application from different templates:
Much more information and setting options can be found in the DataSuite software manual, which is included in the download. There you can find detailed instructions with screenshots.
Further information and assistance free of charge from our support team:
Phone: +49 2742 72927 80
E-Mail: support@mb-datasuite.com
Conclusion
Creating first-class Excel files with a Siemens S7 PLC is no longer witchcraft nowadays. With the right software, even beginners can automatically generate Excel reports of machines and plants.