While WinCC is able to configure interface and archive data as a powerful HMI system, it is inadequate for complex data processing such as data query, computing and statistics. In this paper, the WinCC archiving database is connected with Access database and EXCEL based on VB, then an exe file is generated and can be directly called by WinCC, in which case experimenters can select data storage method and path according to their preferences and accomplish conditional query and complex processing for data.