如何将交易映射到QIF文件中的帐户? [英] How can I map my transactions to accounts in a QIF file?

查看:138
本文介绍了如何将交易映射到QIF文件中的帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在银行有两个帐户,并且想将交易导入GnuCash.我的银行只给我CSV文件,但至少可以将两个帐户的交易都放到一个CSV文件中.

I have two accounts at a bank, and would like to import transactions into GnuCash. My bank only gives me CSV files, but it can at least put transactions for both accounts into a single CSV file.

这些CSV文件无法通过GnuCash解析,因此我决定将它们转换为QIF文件,因为我还可以将帐户信息添加到每笔交易中-或据我所知.

These CSV files are, as is, un-parseable by GnuCash, so I decided I'd convert them to QIF files, as I can also add account information to each transaction — or so I've heard.

问题在于,QIF定义不正确.我正在浏览各种文档片段,但仍然不知道如何格式化我的帐户信息.无论我做什么,GnuCash都会告诉我该文件仅包含一个帐户的帐户详细信息,并使用文件名预填充帐户名.

The trouble is, QIF is badly defined. I'm picking through various fragments of documentation, but I still can't figure out how to format my account information. Whatever I seem to do, GnuCash tells me that the file has account details for only one account, and pre-fills the account name with the name of the file.

!Account
NNameOfAccount
!Type:Bank
D01/01/16
T100.00
MSometext
PSomePayee
^

具有该帐户中每组交易名称的帐户

!Account
NNameOfAccount

...transactions...

!Account
NNameOfOtherAccount

...transactions...

每笔交易之前的帐户

这实际上使我完成了大多数导入步骤,并正确映射了两个帐户.麻烦的是,然后给我一个神秘的错误消息:转换QIF数据时检测到错误."

Account before each transaction

This one actually gets me through most of the import steps, and correctly maps both accounts. Trouble is, I'm then given a cryptic error message: 'A bug was detected while converting the QIF data.'

!Account
NNameOfAccount
^

!Type:Bank
D01/01/16
T100.00
MSometext
PSomePayee
^

!Account
NNameOfOtherAccount
^

!Type:Bank
D01/01/16
T100.00
MSometext
PSomePayee
^

感兴趣的来源

  • QIF文件简介
  • GnuCash的想法一个QIF文件
  • 维基百科上的QIF
  • Sources of interest

    • Introduction to the QIF file
    • GnuCash's idea of a QIF file
    • QIF on Wikipedia
    • 如何格式化QIF文件,以便可以为每笔交易指定帐户名称?

      推荐答案

      我遇到了同样的问题.在线找到多个明确声明,声称GnuCash支持多帐户QIF文件,却没有说明它们的外观,这真令人沮丧.

      I ran into the same issue. It was frustrating to find multiple explicit claims online that GnuCash supported multi-account QIF files with no explanation of what they should look like.

      我最终浏览了GnuCash源代码,发现GnuCash有一个内部开关来忽略QIF文件中的帐户信息,并且显然该开关默认情况下处于打开状态.幸运的是,可以使用!Clear:AutoSwitch指令将其关闭.这样,我便能够生成和导入多帐户QIF文件.示例:

      I ended up going through GnuCash source code and found that GnuCash has an internal switch to ignore account info in QIF files, and apparently that switch is on by default. Fortunately, it can be turned off with the !Clear:AutoSwitch directive. With that I was able to generate and import multi-account QIF files. Example:

      !Clear:AutoSwitch
      
      !Account
      NAssets:Bank:Bank 1
      ^
      !Type:Bank
      D2016-12-10
      T0.01
      PPayday!
      LIncome:Salary
      ^
      D2016-11-10
      T0.01
      PPayday!
      LIncome:Salary
      ^
      
      !Account
      NAssets:Bank:Bank 2
      ^
      !Type:Bank
      D2016-12-15
      T-999.00
      PRent
      LExpenses:Rent
      ^
      

      这篇关于如何将交易映射到QIF文件中的帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆