I have a business savings account with Aldermore. A few months ago, they changed their online banking interface. The new one is an improvement in some ways. It looks better. Instead of the typical old-school financial weirdness of several pages of login, “memorable” words, and picking letters out of a password, they’ve caught up with practice elsewhere and use a full password plus a second factor.

On the other hand, the second factor is only available via SMS, something both inconvenient when travelling or out of mobile signal range and notoriously vulnerable to exploits. But what’s really annoying is that the new interface offers no way to get a statement in a machine-readable form.

You might think that this is an essential feature of a business bank account, where you need to import transactions into an accounting package. Perhaps they do too, but they haven’t actually done anything about this shortcoming.

I contacted them back in January:

Thank you for raising your concern about the change to downloading a statement. We recognise the ability to download your transactions in .CSV format to export into tools, such as accounting software, is important to you. We appreciate this isn’t ideal. However, our Technical team are working on reinstating the .CSV export functionality to internet banking. Once the functionality is available, we’ll be back in touch about all Internet Banking updates. We appreciate your patience, and are sorry for any inconvenience caused.

It’s now April, so I’ve given up waiting around and implemented my own solution in a few lines of JavaScript:

javascript:(() => {
  const fmtDate = d => new Date(Date.parse(d)).toLocaleDateString("en-GB");
  const fmtMoney = s => s.replace(/[^\-\d\.]/g, "");
  const csv = [...document.querySelectorAll("table>tbody>tr")].map(row => {
    const [date, desc, amount] = [...row.querySelectorAll("td")].map(a => a.innerText);
    return `${fmtDate(date)},${fmtMoney(amount)},"${desc}"`
  }).join("\n");
  const link = document.createElement('a');
  link.download = `aldermore-${new Date().toISOString().slice(0,10)}.csv`;
  link.href = `data:text/csv;base64,${btoa(csv)}`;
  link.click();
})();

Save it as a bookmarklet, click it when you’re on the account summary page, and it will download a CSV with today’s date (like aldermore-2024-04-02.csv) ready to be imported into FreeAgent.

This turned out to be fairly easy, as the website uses tables only for transaction data. Every tr represents a transaction, and even JavaScript’s rudimentary date handling can process a date like “28 March 2024” and turn it into the dd/mm/yyyy format FreeAgent’s CSV import requires. Strip out pound signs and commas from the numbers, order the columns appropriately, use a ghost <a> element to download Base 64-encoded data with a filename, and you have it.

It’s even slightly easier than previously, as with the old site I had to go through a step of wrangling their CSV into FreeAgent’s format. Now I just click!

Paul 10 Aldermore’s Technical Team

I hope this saves other people some frustration and tedium too.