GithubHelp home page GithubHelp logo

camt2ofx's Introduction

camt2ofx (compatible with Xero)

Convert CAMT.052 or CAMT.053 (XML) files to OFX.

We use this script to reliably import our ING bank transactions into Xero.

Xero uses Yodlee for its bank feeds. Unfortunately, Yodlee uses "screen scraping" technology to import the data, which has not proven to be reliable.

With us this resulted in:

  • Incorrect debit / credit values
  • Incomplete descriptions
  • Duplicate transactions
  • No separate "Name" & "Description" field

This script has been tested with the Dutch ING bank, via their camt.053 export. It should also work with other banks.

As long as Xero does not support native bank feeds for ING bank, we will rely on "camt2ofx".

Setup

Requirements
  • Ruby 2.x
  • RubyGems
  • Bundler
Clone Git Repository

This application may be cloned or downloaded from GitHub:

git clone https://github.com/bluesnotred/camt2ofx.git
Install Gems
bundle install

Usage

Use the script like this :

$ ruby camt2ofx.rb my_camt_file.xml

The script will create my_camt_file.xml.ofx in response.

camt2ofx's People

Contributors

dependabot[bot] avatar

Stargazers

edsqjr avatar Wietse van den Brink avatar Alexis Marquet avatar Dmytro Yurchenko avatar Floris Kruisselbrink avatar Sonny Gill avatar i2mo avatar

Watchers

Wietse van den Brink avatar

camt2ofx's Issues

Error: undefined method `strftime' for nil:NilClass (NoMethodError)

Under macOS Catalina 10.15.2 on the 2019 16" MacBook Pro, using the zsh shell, I performed the following steps:

  • cloned the git repo as indicated
  • cd into the repo and ran sudo gem install bundler. Output:
Fetching bundler-2.1.4.gem
Successfully installed bundler-2.1.4
Parsing documentation for bundler-2.1.4
Installing ri documentation for bundler-2.1.4
Done installing documentation for bundler after 2 seconds
1 gem installed
  • bundle install, entering my system password to install to RubyGems. Output:
Installing builder 3.2.3
Using bundler 1.17.2
Using mini_portile2 2.4.0
Fetching nokogiri 1.10.4
Installing nokogiri 1.10.4 with native extensions
Fetching camt_parser 2.7.0
Installing camt_parser 2.7.0
Bundle complete! 2 Gemfile dependencies, 5 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
  • ruby camt2ofx.rb test.xml to parse an XML file exported by ABN Amro Netherlands in the CAMT.053 format. Output (account number masked by me):
Start:
End:
Account: NL46ABNA0*********
Bankname: YOUR BANK
Traceback (most recent call last):
	20: from camt2ofx.rb:28:in `<main>'
	19: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:93:in `method_missing'
	18: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:68:in `tag!'
	17: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:175:in `_nested_structures'
	16: from camt2ofx.rb:44:in `block in <main>'
	15: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:93:in `method_missing'
	14: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:68:in `tag!'
	13: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:175:in `_nested_structures'
	12: from camt2ofx.rb:45:in `block (2 levels) in <main>'
	11: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:93:in `method_missing'
	10: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:68:in `tag!'
	 9: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:175:in `_nested_structures'
	 8: from camt2ofx.rb:51:in `block (3 levels) in <main>'
	 7: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:93:in `method_missing'
	 6: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:68:in `tag!'
	 5: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:175:in `_nested_structures'
	 4: from camt2ofx.rb:58:in `block (4 levels) in <main>'
	 3: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:93:in `method_missing'
	 2: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:68:in `tag!'
	 1: from /Library/Ruby/Gems/2.6.0/gems/builder-3.2.3/lib/builder/xmlbase.rb:175:in `_nested_structures'
camt2ofx.rb:59:in `block (5 levels) in <main>': undefined method `strftime' for nil:NilClass (NoMethodError)

Am I doing something wrong or is this a bug in this script? Thanks in advance!

undefined method `statements' for #<CamtParser

This is my first time using bluesnotred, and I am not having success. I have run bundle install and then I attempt to convert the CAMT XML file. However, I get the following error

camt2ofx.rb:11:in `<main>': undefined method `statements' for #<CamtParser::Format052::Base:0x00007fd4d2c37360> (NoMethodError)

How can I troubleshoot this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.