Problem Definition: Variable Export/Import Appears Successful but No Tags Are Created
When using the WinCC Variable Export/Import tool to bulk-create internal tags from a CSV file, the operator observes that the import process executes without any error dialog, the file appears to be accepted, the progress bar completes, and WinCC Explorer remains running. However, the new tags do not appear in the WinCC Tag Management, the internal tag count is unchanged, and the tags are not visible from graphics, scripts, or the tag simulator. This silent-failure pattern is one of the most frequently reported issues when creating large tag sets (typically 50 to 500 tags) in WinCC V7.x, and is a different symptom class from a hard parser error that produces a visible error dialog.
The most common reported scenario is the user successfully exports a working internal tag, opens the resulting CSV in Microsoft Excel, duplicates the row 100 times, modifies only the tag name column, saves the file, and re-imports. The import reports zero new tags. The user may have performed this exact workflow previously and had it work, which leads to the conclusion that the current attempt should also succeed.
Affected Products and Versions
| Product Line | Version Range | Import Tool Used | Failure Mode |
|---|---|---|---|
| WinCC V7 (classic) | 7.0 SP3 through 7.5 SP2 | WinCC Explorer > Tools > Variable Export/Import | Silent: no tags created |
| WinCC V7.4 SP1 Update 1+ | 7.4 SP1 U1 through 7.5 SP2 | Same as above, improved parser | May log warning to import trace |
| WinCC Professional (TIA Portal) | V13 through V19 | TIA Portal tag table import | Different format; see Cross-Platform Note |
| WinCC Comfort/Advanced (TIA Portal) | V13 through V19 | TIA Portal tag table import | Same as Professional |
| WinCC Configuration Tool | 1.5 through 1.8 | Standalone utility | Workaround path (does not fail silently) |
CSV File Structure Specification
The WinCC Variable Export/Import tool expects a comma-separated or semicolon-separated file with a fixed column order. A clean export from a German-locale WinCC V7 SP3 system produces the following structure:
Name;Type;Length;Address;Conversion;InitialValue;Comment
MyTag;INT;2;DB1.DBW0;None;0;Sample internal tag
Key structural rules enforced by the parser:
-
Field separator: semicolon (
;) on German/European locale installs; comma (,) on US English locale installs. The separator is set at WinCC install time and cannot be changed per-project. - Text qualifier: none. The parser does not handle CSV-style double-quote wrapping. Any quote characters in the file are treated as literal data.
- Encoding: Windows ANSI (Windows-1252) is the default. UTF-8 is supported only on WinCC V7.4 SP1 and later with an explicit locale match in the project settings.
- Line ending: CRLF (Windows convention). LF-only files are read but may produce inconsistent row counting on large imports.
- Header row: optional in the import file, but if present must match the localized column order exactly. A mismatch in field count causes every row to be silently rejected.
- Required fields per row: Name (string), Type (one of: BIT, BYTE, INT, UINT, WORD, DWORD, REAL, FLOAT, DOUBLE, BOOL, TEXT, RAW), Length (integer), Address (WinCC address format).
Root Cause 1: Excel-Induced CSV Corruption
Microsoft Excel is the single most common cause of silent import failures in WinCC tag import operations. When a user opens an exported CSV in Excel, performs a copy-paste of rows, and re-saves as CSV, Excel performs three transformations that the WinCC parser cannot tolerate:
-
Numeric coercion: Excel auto-converts strings that look like numbers to numeric format. Tag values such as
100.0,1.5E3, or any string with mixed alphanumeric content followed by a decimal may be silently reformatted, dropping precision or appending scientific notation. - Delimiter substitution: Excel replaces the configured separator with the system default Windows Regional setting delimiter. A semicolon-separated file opened on a US Windows install becomes comma-separated, and the WinCC parser reads the entire first row as a single malformed tag name.
-
Quote injection: Excel adds double-quote characters around any field containing the configured delimiter, leading/trailing whitespace, or special characters. These quotes are written into the output CSV as literal characters that the WinCC parser does not strip, so the parser sees tag names like
"MyTag"(including the quotes) and cannot match them to valid identifiers.
To verify Excel corruption, open both the original export and the modified file in Notepad (Start > Run > notepad, drag file in) and compare the first five lines character-by-character. A typical comparison shows:
Original export:
Name;Type;Length;Address;Conversion;InitialValue;Comment
MyTag;INT;2;DB1.DBW0;None;0;Sample
After Excel edit + save:
Name;Type;Length;Address;Conversion;InitialValue;Comment
"MyTag";"INT";2;"DB1.DBW0";"None";0;"Sample"
The second file is unimportable because the parser sees "MyTag" (with literal quotes) as the tag name. The 2 in the Length field also triggers a numeric-coercion path on some WinCC versions.
Root Cause 2: Encoding and BOM Mismatch
WinCC V7 versions prior to V7.4 SP1 read CSV files in Windows ANSI encoding. If the file is saved as UTF-8 with a byte order mark (BOM) - the default for Notepad on Windows 10 and Windows 11, and for most modern text editors - the parser encounters the three BOM bytes (EF BB BF) as the first characters of the first tag name. The resulting first tag name is corrupted, and depending on the version, the entire row or the entire file is rejected.
To verify, open the file in a hex editor or use a Notepad alternative that shows encoding. The first three bytes should not be EF BB BF for ANSI-targeted WinCC versions. Save the file from Notepad with Encoding set to ANSI (not UTF-8, not Unicode) to eliminate this failure path.
Multi-byte tag names (Chinese, Japanese, Korean) require the project locale to match the file encoding exactly. Mixing a UTF-8 CSV with an ANSI-targeted project locale causes the parser to truncate tag names at the first non-ASCII byte, producing silent data loss on rows that contain non-ASCII characters but appear to import successfully.
Root Cause 3: Header Row and Field Count Mismatch
The Variable Export/Import tool writes a header row that includes localized column names. If the user creates the import file from scratch in Excel or a text editor without first exporting an existing tag set, the header row uses different identifiers than the parser expects. The parser is case-insensitive for most field names but strict on the field count and the order of recognized fields. A header row with eight columns when seven are expected causes the parser to reject the entire file at the first data row, reporting zero imports.
The most common header row mistake is including a trailing empty column from Excel, or including a comment column header such as Description when the parser expects Comment. The field name Description is not a recognized header and the parser drops it, shifting the column count for every subsequent row.
Root Cause 4: First-Line Character Anomaly on File Copy
When users duplicate the export file (e.g., copy export_original.csv to export_modified.csv via Windows Explorer), certain file operations can introduce invisible characters at the start of the file:
- Cloud sync handoff: OneDrive, Dropbox, and similar services may rewrite file headers when synchronizing. The resulting file has the same content but a different initial byte sequence.
- Long-path paste: Copying a file with a path exceeding 260 characters through certain archive utilities inserts a NUL byte at position 0.
- Edit in place vs. copy: When the file is opened directly in the export tool's output directory and edited in place, no transformation occurs. When the file is copied elsewhere and back, the transformation can occur.
Always edit the file in place at the path where the export tool created it, or save the modified file via Notepad's File > Save As with ANSI encoding explicitly selected.
Step-by-Step Recovery Procedure
Follow this sequence to recover a working bulk-import workflow in WinCC V7:
- In WinCC Explorer, stop the Runtime if it is active. The Variable Export/Import tool blocks database writes while Runtime is running.
- Open Tools > Variable Export/Import. Select Export, point to a destination folder, and save as
reference_template.csv. Confirm the export reports a non-zero record count. - Close the export tool. Do not modify the file with Excel, Word, LibreOffice, or any rich-text editor.
- Open
reference_template.csvin Notepad. Use Start > Run >notepadand drag the file into the window. Verify the file starts with the localized header line. For English locale this is:Name;Type;Length;Address;Conversion;InitialValue;Comment(or comma-separated on US English installs). - Select the data row of the source tag you want to replicate. Copy the entire line including any trailing semicolon.
- Paste the row 99 more times to produce 100 total identical rows. Verify in Notepad that each row is identical character-for-character to the source row.
- Edit only the Name field on each row. Do not retype the data type, length, address, or comment columns - use arrow keys and Backspace to modify values in place. Retyping columns is the most common path to introducing stray commas or whitespace.
- Verify tag name rules: max 128 characters, must start with a letter or underscore, allowed characters are A-Z, a-z, 0-9, underscore, and dollar sign. Names with spaces, hyphens, or non-ASCII characters are silently rejected at import time.
- Save the file. In Notepad, File > Save As. Set Encoding to ANSI. Set filename to
tag_import.csvwith the .csv extension. Confirm the file size is reasonable (100 rows of typical length should be under 50 KB). - Reopen WinCC Variable Export/Import. Select Import. Point to
tag_import.csv. - The import dialog should report "X records imported" where X equals the number of data rows. If the count is zero, the file is corrupted - return to step 2 and repeat with a fresh export.
- Open WinCC Tag Management. Navigate to Internal Tags. The new tags should appear with the configured names. Verify the tag count matches the import count.
Alternative: WinCC Configuration Tool (V1.8)
For bulk operations above 50 tags, the WinCC Configuration Tool (current release 1.8) provides a more reliable path. The tool is a standalone Siemens utility that runs outside WinCC Explorer, uses a native reader that is more tolerant of encoding variations, and writes directly to the WinCC project database without going through the CSV parser layer that is the source of the silent-failure problem.
The tool is available from Siemens Industry Online Support. Search for entry ID 109770105 ("WinCC Configuration Tool") or browse the WinCC V7 downloads section. The tool is licensed separately and requires a valid WinCC V7 license.
To use the Configuration Tool for tag import:
- Close WinCC Explorer completely. The project database is locked while WinCC is open.
- Launch WinCC ConfigurationTool 1.8 as Administrator (right-click > Run as administrator).
- Open the target WinCC project. Use File > Open and select the
.mcpfile. - Navigate to the tag section. The tool supports both internal tags and PLC tags.
- Use File > Import > CSV. Select the same
tag_import.csvfile. The tool reports line-by-line errors with the offending row number and field name, eliminating the silent-failure mode. - Save the project. The tool writes changes to the
.mcpdatabase directly. - Reopen WinCC Explorer and verify the new tags appear in Tag Management.
The Configuration Tool also supports drag-drop reordering, bulk attribute editing, and a comparison view between the current database state and an imported file. For projects with more than 200 tags, this is the recommended path.
Verification Checklist
| Check | Expected Result | Failure Indicator | Action on Failure |
|---|---|---|---|
| Tag count in Tag Management | Increases by exact import count | Unchanged count | Import silently failed; check file |
| Import dialog record count | Matches row count in CSV minus header | Zero reported | File rejected at header parsing |
| Tag name in graphics prefix dialog | Resolves, no red X marker | Red X icon visible | Tag name not imported or has invalid character |
| WinCC project file modification time | Updated to import time | Unchanged | Database write was blocked |
| Tools > Check Consistency | No errors on new tags | Errors on new tag rows | Address format invalid for tag type |
| Tag simulator (internal tags) | Tag visible, modifiable | Tag not in list | Tag created in wrong folder |
| Project backup timestamp | Updated after import | Unchanged | Import transaction did not commit |
Field-Proven Caveats
- Tag name length limit: 128 characters maximum. Imports with longer names are silently rejected. Excel users frequently exceed this when tag names include full descriptions.
- Special characters in names: Spaces, hyphens, periods, slashes, and non-ASCII characters in tag names are dropped or rejected without warning. The parser does not log a warning, so the tag simply does not appear.
- Runtime must be stopped: The Variable Export/Import tool runs in-process with WinCC Explorer. If WinCC Runtime is active, the import is blocked at the database level and reports success without writing any records. Always verify Runtime is stopped via the WinCC Explorer toolbar before importing.
- Non-atomic commits: The import is not transactional. If the file contains 100 tags and tag 47 fails validation, tags 1-46 are imported and tags 48-100 are silently skipped. The import dialog does not report partial success. After any import, verify the actual count matches the expected count.
-
Address format strictness: The Address column must follow WinCC address syntax exactly.
DB1.DBW0is valid;DB1.DBW 0(with space) is not. PLC address format differs between S7-300/400 and S7-1500; using the wrong format silently fails import. - Multi-user project conflicts: If the project is opened in multi-user mode on a WinCC server, the import must be performed on the server, not on a client. Client-side imports are silently rejected.
- License-tag count limit: WinCC tags count against the point license. An import that exceeds the licensed point count is partially imported up to the license limit, with no warning.
- Comment field size: The Comment column accepts up to 255 characters. Longer values are silently truncated.
Cross-Platform Note: TIA Portal WinCC
If the project is a TIA Portal WinCC Professional or Comfort/Advanced configuration, the Variable Export/Import tool is not present. The equivalent workflow uses the TIA Portal tag table editor:
- Open the TIA Portal project.
- Navigate to PLC tags or HMI tags in the project tree.
- Open the target tag table. Right-click and select Export > Excel. TIA Portal exports to XLSX format, not CSV.
- Edit the exported XLSX file in Excel. The XLSX format is more robust than CSV for TIA imports and supports multi-row headers and formula evaluation.
- Right-click the tag table and select Import > Excel. Point to the modified XLSX file.
The TIA Portal parser is more tolerant of Excel-formatted files but still fails silently on tag name length violations, address format errors, and PLC tag type mismatches. For TIA Portal, the same verification checklist applies, with the additional check that the TIA Portal project must be recompiled after the import for the tags to be available to the WinCC Runtime.
FAQ
Why does the WinCC Variable Export/Import tool report success but create no tags?
The import tool returns success when the file is read and the parser begins processing, not when records are committed to the database. The most common cause is a CSV structure the parser rejects: BOM bytes from UTF-8 encoding, Excel-introduced quotation marks, or a header row that does not match the localized column order. Open the original export in Notepad and compare it character-for-character to the modified file to identify the difference.
Can I use Excel to edit the WinCC tag CSV before import?
Not reliably. Excel reorders delimiters based on the system locale, auto-converts numeric strings, and adds quotation marks around special-character fields. The result is a file that the WinCC parser reads without error but rejects every row. Use Notepad or Notepad++ with the encoding set to ANSI and the line ending set to CRLF.
What encoding should the WinCC import CSV use?
WinCC V7 prior to SP4 requires Windows ANSI (Windows-1252). WinCC V7.4 SP1 and later, and TIA Portal WinCC, support UTF-8 only with an explicit locale match in the project settings. If the project locale is German, the file encoding must match German Windows ANSI. Save the file from Notepad with Encoding set to ANSI to avoid BOM-related issues.
Is the WinCC Configuration Tool 1.8 a replacement for Variable Export/Import?
Yes for bulk operations. The Configuration Tool is a standalone utility that bypasses the CSV parser and writes directly to the WinCC project database. It is more tolerant of file format variations and reports line-by-line errors, eliminating the silent-failure mode. Close WinCC Explorer before launching the Configuration Tool, and run it as Administrator.
Why does copying the exported CSV break the import?
Some Windows operations - cloud sync handoff, long-path paste, archive utility extract - prepend a UTF-8 BOM or insert a NUL byte at the start of the file. The WinCC parser reads this as the first character of the first tag name, so the entire file is treated as a single malformed row and zero records are imported. Always edit the file in place at the path where the export tool created it, or save via Notepad with ANSI encoding explicitly selected.