CSV cleanup, with a row-by-row audit trail

A reproducible synthetic demonstration. No real customer records, sales, or income are represented. The CSV pipeline passes 18 automated tests; actual Excel UI behavior and arbitrary workbooks have not been validated.

What the example does

Three CSV exports contain 15 input rows, mixed field names, duplicate orders, invalid amounts, and date errors. The pipeline applies explicit rules rather than guessing the intended business value.

Verified synthetic run
ResultRows
Unique valid orders6
Exact duplicate collapsed1
Exceptions held for review8
Total reconciled15

Totals stay separate by currency: CNY 1,262.76 and USD 12.34. These are synthetic order totals, not fees, profit, or recognized revenue.

Inspect the actual outputs

Downloads contain synthetic data only. Local machine paths were replaced with synthetic_inputs; numerical results are unchanged. Some source fields intentionally retain Chinese headers to test mixed export formats. In Excel, import order IDs as text to preserve leading zeros.

What the tests cover

The test suite checks row reconciliation, decimal arithmetic, exact and conflicting duplicates, leading-zero IDs, field validation, input preservation, and dangerous CSV text escaping. It is not a performance benchmark or a security certification for every spreadsheet program.

Scope and limits

File count, row count, columns, unique keys, accepted date formats, currency rules, and exception handling need separate agreement. Native Excel workbooks, formulas, macros, production integration, accounting decisions, and large-file performance are not demonstrated here. Business and financial interpretations require your review.

Related CSV tutorial on YouTube (external link; no video is loaded on this site).