BytePlainlab
Discuss Tech 交流技术
Runs in your browser Balance check on every row

Bank Statement Lines to a Checked Table

Copying transactions out of a statement usually loses something: a minus sign, the parentheses around a debit, or the fact that a row no longer adds up. This experiment splits each line into columns and checks every row against the running balance, so a broken row is visible instead of quietly ending up in your spreadsheet.

Try it

Paste statement lines below, one transaction per line, ending with the amount and the running balance. Rows that do not reconcile are highlighted.

Date Description Amount ($) Balance ($)

How it works

  1. Split. Each line is split on whitespace. The first token is the date, the last two are the amount and the running balance, and everything in between is the description.
  2. Read the sign separately. A leading minus or accounting parentheses such as (150.00) mark a debit. The sign is recorded on its own and removed from the digits, so -15.00 cannot turn into --15.00.
  3. Reconcile. For every row after the first, the previous balance plus this row's amount must equal this row's balance. When it does not, the row is highlighted and marked ⚠ rather than exported as if it were fine.
  4. Export safely. In the CSV, a description that starts with =, +, - or @ gets a leading apostrophe, so a spreadsheet will not run it as a formula.

Everything happens in this page: the text you paste is not sent anywhere. Found a statement layout that breaks it? Send a redacted sample to hi@byteplain.com.

What this experiment does not handle 这个实验不处理什么

  • Works on text you paste, one transaction per line. It does not read PDF files or images.只处理粘贴进来的文本,每行一笔交易;不读取 PDF 文件或图片。
  • Expects the amount and the balance as the last two numbers on each line. Statements laid out differently need their columns rearranged first.要求每行最后两个数字是金额和余额;版式不同的对账单需要先调整列序。
  • A description that wraps onto the next line comes out as a separate row with no amount, or is dropped if it has fewer than three words.摘要折到下一行时,会变成一行没有金额的残缺记录;少于三个词的折行会被直接丢掉。