Skip to content

Instantly share code, notes, and snippets.

@dominiceden
Created July 2, 2017 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominiceden/230a2aeb6934a4e6a3329cf640cfae6c to your computer and use it in GitHub Desktop.
Save dominiceden/230a2aeb6934a4e6a3329cf640cfae6c to your computer and use it in GitHub Desktop.
Reverse Lloyds Banking statement CSV
require 'csv'
in_csv = CSV.read('/Users/Dominic/Downloads/in.csv').reverse
CSV.open("/Users/Dominic/Downloads/out.csv", "wb") do |csv|
in_csv.each do |line|
csv << line
end
end
@dominiceden
Copy link
Author

dominiceden commented Jul 2, 2017

Because for some unknown reason, Lloyds Banking statements exported as CSV are backwards (i.e. most recent first), so they need to be reversed for importing into Crunch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment