A CSV export with a totals row that breaks the import

Many exports end with a line that is not a transaction: a closing balance, a sum of the period, a "Saldo final". An importer that expects a date in every row can stop on that line or refuse the file, and one that accepts it can book the closing figure as one more movement. Choose the file below: the page works in your browser, leaves that line out, shows the first 20 cleaned rows and lists every line it left out, with the reason.

Clean your CSV export before the import

The cleaner looks for a header row, a date column and an amount column, and writes eight fixed columns: date, description, amount, currency, fee, net, reference and source. If it cannot find those columns in your file, it says so and outputs nothing.

Your file is read in your browser and is never uploaded, stored or logged. It is held in the memory of this tab only, and closing or reloading the page discards it. Operator: Augeo. See the privacy notice.

Exports do not share one layout, and this page makes no promise about yours: the free preview shows what it does to your file.

The cleaning logic is checked by an automated test script that runs the engine file of this site over six synthetic sample files and a set of checks of the parsing rules; it ran in a sandbox before this site was published and finished with no failed check. The script does not open this page in a browser, does not test the licence key step, and nothing was tested against a real export from any provider. Use the free preview to check your own file.

Download the full cleaned file

  • Price: 6 USD, paid once on Gumroad. No subscription. You receive a licence key.
  • What the key unlocks: the download of every cleaned row of the file you chose, as one CSV named after your file with -cleaned.csv at the end, instead of the first 20 rows on screen. The report and the way files are read stay the same.
  • The key is for one buyer. Runs are not counted and no number of runs is promised. The key is kept in the memory of this page only, so you enter it again after closing or reloading the page.
  • Refunds are requested through your Gumroad receipt and follow Gumroad's refund policy.
  • Try the free preview first. If the preview cannot read your file, the full download cannot either.

Get a licence key on Gumroad for 6 USD

Prefer a file you keep? Offline CSV cleaner, single HTML file, 6 USD on Gumroad. The offline file was built from an earlier version of the engine, and its build self-check covered the six original sample layouts (PayPal activity, Etsy sold orders, Etsy monthly statement and three bank layouts); it does not include the later Fee/Net column reading used for the Stripe, Shopify, eBay and Square pages.

What happens to the closing line of the file

The last transaction and the closing line of a debit-and-credit sample file and of a semicolon sample file, both synthetic, as they are in the file and as the cleaner writes them
In the exportIn the cleaned file
30 Apr 2024,Transfer,Owner drawings,"£1,000.00",,"£6,589.00"2024-04-30,Owner drawings,-1000.00,GBP,,-1000.00,,bank
Closing balance,,,,,"£6,589.00"No line: listed as a footer line
31/03/2024;Transferencia recibida cliente 725;15,00;EUR;7.470,99;TR-00252024-03-31,Transferencia recibida cliente 725,15.00,EUR,,15.00,TR-0025,bank
Saldo final;;;;7.470,99No line: listed as a footer line

For the first sample file as a whole the counts add up: rows in 11 = rows out 8 + duplicates dropped 0 + footer lines 1 + not parsed 2, with 3 lines above the header.

For the second sample file: rows in 27 = rows out 24 + duplicates dropped 1 + footer lines 1 + not parsed 1.

What the test script covers is a closing line that comes after the last transaction and holds no date. A subtotal between transactions, and a closing line that carries a date of its own, are described on the page about total and footer lines in a bank CSV; read it if your export has either.

Write the closing balance down before you import. It is the figure to compare with after the import: the opening balance plus the sum of the amount column should give it. A gap is usually the amount of a row listed as not written.

This is a cleaner for files of transactions and not a general CSV editor. The output is always the same eight columns, and columns of your file that are not among them are not carried over.

How to remove the line by hand

  1. Work on a copy and keep the downloaded file untouched.
  2. Open the copy in a plain text editor, not in a spreadsheet, so dates and amounts are not rewritten when you save.
  3. Go to the end of the file and note the closing figure, then delete every line after the last transaction, blank lines included.
  4. Look at the top as well. If lines sit above the row of column names, delete them so the column names are on the first line.
  5. Save under a new name with the same extension and import that file.

Notices

Other pages

Report a problem — tell us what failed; we reply to your email when it is fixed.