Reorder the CSV rows so their adjacent same-content cells be merged