Using Node to convert HSBC statements into a CSV file.
HSBC are still refusing to provide statements in a CSV format. In the meantime, you could use this approach to at least extract this data.
npm install
- Place the PDF into the /pdf directory
- Open the PDF and make a note of the date of the 1st transaction
- Run the following:
node index.js
- You'll be prompted for the statement type (credit card or other)
- Next you'll be asked for the date of the first statement entry
- The process is a bit cumbersome, but you'll be asked to identify the float value of the record (is it a debit, credit or balance)
- Then you'll be asked if the transaction entry is complete (you can also ignore entries or skip to the next page)
- This process is repeated for each page of the PDF
- Check the csv directory for the resultant file
My hope is that HSBC eventually catch up but I'll try and keep making incremental changes. I had hoped to fully automate this but the formats of the PDF I found very inconsistent. This prompt approach is cumbersome but feels slightly less effort than copying and pasting and organising the PDF.