Define the update before the upload
Imagine a Budapest stationery distributor receiving CSV files from European suppliers. Staff want to update product descriptions and pack sizes in its catalogue. Start with a narrow rule: choose the supplier, match its existing product codes, update only approved columns and leave other fields untouched. Treat unknown codes as issues to review.
Decide what a blank cell means for each editable column: keep the current value, clear it or reject the row. Preserve product codes as identifiers, including leading zeros. Give staff a sample file and explain the accepted column names, separators and encoding; test exports from the spreadsheet tools they actually use.
Validate the content and explain the problems
MDN explains that a file input's accept setting is a selection hint, not validation; the server must check requirements. Ask the team to demonstrate a rejected file before any catalogue changes occur. Agree supported file and row limits, with a useful explanation when a submission exceeds them.
W3C's tabular metadata specification describes column types and required values. Use an explicit column contract for this project. Require errors to identify the row, column and correction needed. For the distributor, duplicate supplier codes within one file should block the update until staff resolve which value was intended.
Preview actual changes
Show existing and proposed values beside each other, with totals for changed, unchanged and rejected rows. Let staff inspect the affected products before confirming. If the preview merely repeats the uploaded file, it cannot show whether a description will overwrite a newer catalogue entry.
Decide what happens if another employee edits a product after preview. A useful rule is to require a fresh review for conflicting records before applying the batch. Make cancellation leave the catalogue unchanged, and make the final action clearly describe the update being authorised.
Agree failure and recovery behaviour
Rejecting the whole file when validation finds a problem gives staff a simpler result to understand, but delays valid changes. Applying approved valid rows can keep work moving, while leaving a reconciliation task. Choose deliberately and explain the outcome in a report. Separately test what happens if saving fails midway.
Keep a batch reference and a record of the changes actually applied. After an interrupted response, staff should check that result before submitting again. If rollback is offered, demonstrate how it handles later manual edits; restoring an older value must not silently erase someone else's subsequent work.
Rehearse with a small sample
Approve the import using a test catalogue and a small, deliberately awkward file. Ask the team to show the final stored records as well as the messages on screen.
- Try unknown and duplicate codes, including an identifier with leading zeros.
- Check blank cells, accented descriptions and invalid pack sizes.
- Compare preview totals and old/new values with the expected changes.
- Cancel a preview, then test an edit made by another employee before confirmation.
- Interrupt a run and verify its recorded outcome before attempting recovery.
- Rehearse any rollback and confirm that later unrelated edits remain intact.