Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 35840700, Entry date: 04/12/2018

Export of WinCC/CAS archive data with a separate application

  • Entry
  • Associated product(s)
The application example shows how to access the compressed and binary-coded WinCC archive data with the aid of your own C# application. The data are then available in a format suitable for further processing.

The WinCC Runtime database is segmented for WinCC V6.0 and higher. This means that the data is stored in several archive segments (several databases), partly in compressed, binary form.
Both WinCC and the WinCC “WinCC Connectivity Pack” option provide the WinCC OLE DB Provider. It enables direct reading of the Tag Logging and Alarm Logging Runtime data. The WinCC OLE DB Provider provides the data from the respective archive segments in decompressed, decrypted form. Thus the user does not have to worry about the segmentation of the archives and their encryption when accessing the Tag Logging and Alarm Logging data.

Figure 01

Reading the archive of the tag and alarm logging files using an external application which uses the WinCC OLE DB Provider and then exports the data in a format suitable for further processing (e.g. *.csv).

To read out the archives and export them for further processing, the C# application “WinCCcopack.exe” was created.

This application covers the following key points:

  • Independent application
  • Establishing a connection with the OLE DB Provider
  • Reading out the data from the WinCC Runtime database of an OS server or a CAS (Central Archive Server)
  • Accessing the archives by logging on as a database user with password
  • Additional option to read out user archives
  • Using the time filter
  • Option to export the read out data as *.csv or using CrystalReports

Figure 02

The focus of the documentation is the description and creation of of the application.


  • Created with: Visual Studio 2005 Professional and Crystal Report 2008
  • Tested with: SIMATIC WinCC V6.2 or V7.0.

Documentation and example project

SIMATIC WinCC courses
Basics can be acquired in the “SIMATIC WinCC, system course” in the SITRAIN series:
SIMATIC WinCC, Systemkurs (de)
SIMATIC WinCC, System Course (en)

Topics for cross-system communication using the WinCC/Connectivity Pack are discussed in the “SIMATIC WinCC advanced course”, among many other topics:
SIMATIC WinCC, Aufbaukurs (de)
SIMATIC WinCC, advanced course (en)

Further Information
The following entries provide supplementary information for retrieving archive data.

  • Application example “Exporting Archive Data with the SIMATIC WinCC/Connectivity Pack (OLE DB Provider)”, entry ID: 38132261

  • Application example “WinCC/IndustrialDataBridge: Writing data from SIMATIC WinCC or from SIMATIC controllers in MS Office files”, entry ID: 109483465 

  • Application example "OPC UA ExcelClient for WinCC V7.4 SP1"
    Entry ID: 109752976

Last Changes
10/2009: First version of the Excel and C# application
10/2014: Adaptation of the Excel application for SQL Server 2008
02/2018: Moving the Excel application to another application, entry ID: 38132261

Additional Keywords
Archive data export, archiving, logging, saving tags, loading tags, process tags, persistent saving, Excel saving, OLE DB Provider, WinCC OLE DB Provider, Connectivity Pack