An administrator uploads a spreadsheet and receives a message saying that the import completed with errors. Some attendees now appear twice. Others are missing. The original file contains several hundred rows, and nobody knows which ones need to be repaired. The difficult part of CSV import validation is often explaining the outcome, rather than reading the file.
A dependable importer gives people a chance to inspect the interpretation before it changes live records. Parsing, validation, preview and commit should be recognizable stages. Each stage answers a different question, and combining them behind one upload button makes mistakes harder to understand.
Define the file contract before building the screen
Imagine a fictional training provider importing registrations from a partner. The file contains attendee names, session codes and dates. Some column headings use the partner's terminology, and a name can legitimately contain a comma. Splitting every line on commas will not produce a dependable interpretation of that file.
RFC 4180 documents a common CSV format, including quoted fields and escaped quotation marks. Use a suitable parser, and explain which encodings, delimiters and headers your product accepts. Separately define the business contract: which fields are required, which identifiers recognize an existing attendee and which date format is expected. A technically valid CSV can still be unsuitable for the intended import.
Provide a small downloadable example containing realistic formatting. Include an optional field and an ordinary special character, rather than demonstrating only perfectly simple names. The example should match the current importer, with a version or date that helps support staff identify an outdated template.
Make the preview describe the proposed changes
Before commit, show how source columns map to application fields. Summarize the number of proposed additions, updates, unchanged rows and blocked rows. Do not present every accepted row as a new record if some will replace existing values.
For the training provider, a row with a recognized attendee identifier might update a dietary note while keeping the existing session booking. That behavior belongs in the preview. The operator should be able to inspect representative changes and understand whether blank cells clear existing values or leave them alone.
If a default will be applied, display it. An assumed timezone or automatically selected session can alter the meaning of a registration even when the row passes validation. The preview is the place to expose that assumption while correction is still inexpensive.
Write row errors that support repair
Keep the original source row number with each result. Explain the field, the rejected value when safe to show, and the correction required. A missing session code needs a different message from an unrecognized code. A duplicate inside the uploaded file needs a different explanation from a match against an existing record.
Offer a downloadable error report without silently changing the user's original file. Preserve enough information to reconnect a corrected row with the failed attempt. Avoid repeating sensitive attendee details unnecessarily in logs or screenshots used for support.
Treat commit as a controlled operation
Decide whether the import is all-or-nothing or allows approved valid rows to proceed. Both approaches can be reasonable; the interface must state which one applies. Bind commit to the validated file and mapping so a later change cannot be mistaken for the preview the operator reviewed.
Give the run an identifier, prevent accidental repeated submission and produce a final reconciliation. If processing stops, distinguish completed rows from pending work. An importer designed as part of custom business software should leave the operator able to answer a plain question: what changed, and what still needs my attention?



