Trim padding and blank rows in a stock list
Clean a small import file that contains whitespace around values and a completely blank row.
Set up the example
Run the cleaner and inspect the row whose SKU originally had a space on either side.
Check the result
The cleaned SKU should be A17. Check that the blank row is gone and all three product records remain.
Run this task
Use your own file or download the practice input below. The checks on this page describe the practice result.
Continue with a related task
- Clean a CSV and create an Excel workbook
Trim cells and remove blank rows → Write the cleaned table to XLSX
- Trim and deduplicate a CSV before import
Trim fields and remove empty rows → Remove rows that match after cleanup
- Make an inventory workbook from a quoted CSV
- Export the stock worksheet as a CSV feed