Bulk workflows

How to find trailing spaces and invisible characters in a QR CSV

Flag hidden spaces and control characters in Excel before a QR CSV import. Review titles and verify destination URLs against the source before creating codes.

Written by
VastQR Product & Editorial Team
Last updated
On this page
  1. Flag cells for review without changing the CSV
  2. Correct titles and destinations separately
  3. Verify the CSV you will actually upload
  4. FAQ

Flag cells for review without changing the CSV

Keep an untouched copy of the source CSV. In Excel, use Data → From Text/CSV → Transform Data to load a working copy. In Power Query, remove any automatically added Changed Type step before setting the title and destination columns to Text, then load the data. Confirm the preview retains the original values, including any leading zeros. See Microsoft's text and CSV import instructions and its automatic conversion guidance, checked November 23, 2026 UTC. Neither page showed a publication date.

Add a helper column next to the data. For a cell in A2, use this length check:

=LEN(A2)<>LEN(CLEAN(TRIM(SUBSTITUTE(A2,UNICHAR(160)," "))))

Fill it down and repeat for the destination column, using that column's cell reference. The formula replaces nonbreaking spaces with ordinary spaces for comparison, applies TRIM and CLEAN, and flags changes in length. TRIM can also collapse runs of ordinary interior spaces, so review flagged titles before editing them.

A same-length substitution can escape a length check. To catch a nonbreaking space that simply becomes one ordinary space, compare the original text with the proposed cleanup instead:

=NOT(EXACT(A2,CLEAN(TRIM(SUBSTITUTE(A2,UNICHAR(160)," ")))))

If neither check flags a cell and you have no other reason to suspect it, leave it alone. If the value looks wrong or behaves unexpectedly, compare it with a trusted copy even when both checks return FALSE. Microsoft's TRIM documentation describes its ASCII space scope, and its CLEAN documentation limits the function to ASCII control values 0–31 and explains that other nonprinting characters can remain. The guidance was checked November 22, 2026. The pages showed no publication date.

Correct titles and destinations separately

For a title, remove accidental characters and preserve spacing that belongs in the label. VastQR's code review showed that its download filenames normalize the title portion and replace runs of characters outside a–z and 0–9 with hyphens. The CSV validator has no repeated-title warning. Use the full filename to distinguish files, including its position prefix, which reflects the download order.

For a destination, use the exact URL from the source system to correct a flagged cell. Avoid applying cleanup blindly to the middle of a URL. VastQR's code review showed that it trims the ends of the destination input and serializes the URL through a URL parser, which can percent-encode an interior space in a path. The format check makes no request to the destination. Open the corrected URL and confirm the intended page before importing.

Illustrative example. Suppose the title Table 001 has an extra trailing space. If the clean title is what the source calls for, remove the trailing space. If a destination contains /table /001 while the source shows /table/001, replace it with the source URL. The interior space matters because it can become %20 in the path. Titles such as TABLE_001 and TABLE-001 can also yield the same table-001 title portion in a ZIP filename. The file position prefix keeps those filenames distinct within the download.

Verify the CSV you will actually upload

Export just the intended upload columns to CSV, leaving the helper columns out. Open that exact saved file in a plain-text editor, or load it in a CSV viewer with both columns explicitly treated as text. Compare the headers and row order, then compare each parsed title and destination with the corresponding values in the corrected source. In a text editor, account for CSV quotes and delimiters when comparing the values. Correct any mismatch in the working copy, export again, and repeat the check on the replacement file.

Illustrative export mismatch. If the corrected title should be 00123 but the saved CSV contains 123, the upload file fails the comparison even if the cleanup helper returned FALSE. The helper checks characters in the cell it sees. The final comparison catches digits missing from the value you are about to upload.

Once your CSV matches the source, follow the VastQR bulk QR guide for Excel or CSV. The VastQR print guide covers preparing the resulting artwork for print.

The spreadsheet limits come from Microsoft documentation. The VastQR behavior comes from the November 20, 2026 code review. The example illustrates a cleanup decision. No import, specific invisible-character behavior, phone scan, or print test was run for this guide.

Frequently asked questions

Does a matching length prove that a cell has no invisible characters?

A matching length means the cleanup pass produced the same total character count. Use the exact-text comparison to catch same-length substitutions, and compare suspicious cells with the source because some characters survive both functions.

Should I apply the Excel cleanup formula directly to every destination?

Use it to flag rows for review. Replace a suspect URL with the trusted source value and open it to verify the destination before importing.

Can two titles produce the same title portion in downloaded filenames?

Yes. VastQR's code review showed that titles such as TABLE_001 and TABLE-001 normalize to the same title portion. The download position prefix distinguishes the full filenames within that download.