import-transactions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Import Transactions

导入交易记录

Overview

概述

Import financial transactions from bank export files. Automatically detects file format by extension (.csv, .ofx, .qif) and identifies the bank (Chase, Amex, BofA, or generic) by inspecting column headers. Previews parsed transactions, deduplicates against existing data, and inserts new records.
从银行导出文件中导入财务交易记录。通过文件扩展名(.csv、.ofx、.qif)自动检测文件格式,并通过检查列标题识别银行(Chase、Amex、BofA或通用类型)。预览解析后的交易记录,与现有数据进行去重,并插入新记录。

Wilson Tools Used

使用的Wilson工具

  • transaction_search
    — check for existing transactions to prevent duplicates
  • categorize
    — apply categorization rules to newly imported transactions
  • transaction_search
    —— 检查现有交易记录以防止重复
  • categorize
    —— 对新导入的交易记录应用分类规则

Workflow

工作流程

  1. Ask the user for the file path to their bank export.
  2. Detect the file format by extension:
    • .csv
      — parse as CSV, inspect headers to identify bank
    • .ofx
      /
      .qfx
      — parse as OFX (Open Financial Exchange)
    • .qif
      — parse as QIF (Quicken Interchange Format)
  3. For CSV files, identify the bank by header patterns:
    • Chase:
      Transaction Date,Post Date,Description,Category,Type,Amount,Memo
    • Amex:
      Date,Description,Amount
      (or
      Reference,Date,Description,Card Member,Amount
      )
    • Bank of America:
      Date,Description,Amount,Running Bal.
    • Generic: any CSV with recognizable date, description, and amount columns
  4. Preview the first 5 parsed transactions for the user to confirm.
  5. Deduplicate by matching date + amount + description against existing transactions.
  6. Report how many new vs. duplicate transactions were found.
  7. Insert new transactions into the database.
  8. Offer to run
    categorize
    on the newly imported transactions.
  1. 向用户索要银行导出文件的文件路径。
  2. 通过扩展名检测文件格式:
    • .csv
      —— 按CSV格式解析,检查标题以识别银行
    • .ofx
      /
      .qfx
      —— 按OFX(Open Financial Exchange,开放金融交换)格式解析
    • .qif
      —— 按QIF(Quicken Interchange Format,Quicken交换格式)格式解析
  3. 对于CSV文件,通过标题模式识别银行:
    • Chase
      Transaction Date,Post Date,Description,Category,Type,Amount,Memo
    • Amex
      Date,Description,Amount
      (或
      Reference,Date,Description,Card Member,Amount
    • Bank of America
      Date,Description,Amount,Running Bal.
    • 通用类型:任何包含可识别日期、描述和金额列的CSV文件
  4. 向用户预览前5条解析后的交易记录以确认。
  5. 通过匹配日期+金额+描述与现有交易记录进行去重。
  6. 报告发现的新交易记录与重复交易记录数量。
  7. 将新交易记录插入数据库。
  8. 提供对新导入的交易记录运行
    categorize
    的选项。

Without Wilson

不使用Wilson的情况

You can import transactions manually into any spreadsheet or accounting tool:
你可以手动将交易记录导入任何电子表格或会计工具:

Downloading Exports

下载导出文件

Chase:
  1. Log in at chase.com
  2. Go to the account > Statements & Documents
  3. Click Download account activity (top right of transaction list)
  4. Select date range and format: CSV, OFX/QFX, or QIF
  5. File downloads to your computer
American Express:
  1. Log in at americanexpress.com
  2. Go to Statements & Activity
  3. Click Download your Transactions (right side or under the kebab menu)
  4. Select date range, choose CSV or OFX/QFX
  5. Download
Bank of America:
  1. Log in at bankofamerica.com
  2. Go to the account > Information & Services tab
  3. Click Download transactions
  4. Select date range and format: Microsoft Excel (.csv), Quicken (.qfx), or QuickBooks (.qbo)
  5. Download
Generic / Other Banks: Most banks offer CSV or OFX export from their transaction history page. Look for "Download," "Export," or a download icon near the date range selector.
Chase:
  1. 登录chase.com
  2. 进入账户 > Statements & Documents(对账单与文档)
  3. 点击Download account activity(下载账户活动记录)(交易列表右上角)
  4. 选择日期范围和格式:CSVOFX/QFXQIF
  5. 文件将下载到你的电脑
American Express:
  1. 登录americanexpress.com
  2. 进入Statements & Activity(对账单与活动记录)
  3. 点击Download your Transactions(下载你的交易记录)(右侧或三点菜单下)
  4. 选择日期范围,选择CSVOFX/QFX
  5. 下载
Bank of America:
  1. 登录bankofamerica.com
  2. 进入账户 > **Information & Services(信息与服务)**标签页
  3. 点击Download transactions(下载交易记录)
  4. 选择日期范围和格式:Microsoft Excel (.csv)Quicken (.qfx)QuickBooks (.qbo)
  5. 下载
通用/其他银行: 大多数银行在交易历史页面提供CSV或OFX导出功能。在日期范围选择器附近寻找“Download(下载)”、“Export(导出)”或下载图标。

Manual Import into a Spreadsheet

手动导入到电子表格

  1. Open the CSV in Excel or Google Sheets.
  2. Normalize columns to:
    Date
    ,
    Description
    ,
    Amount
    ,
    Category
    .
  3. Make amounts negative for expenses, positive for income/credits.
  4. Remove duplicate rows using Data > Remove Duplicates (Excel) or the
    =UNIQUE()
    function (Sheets).
  5. Sort by date.
  1. 在Excel或Google Sheets中打开CSV文件。
  2. 将列标准化为:
    Date
    Description
    Amount
    Category
  3. 支出金额设为负数,收入/贷方金额设为正数。
  4. 使用Data > Remove Duplicates(数据 > 删除重复项)(Excel)或
    =UNIQUE()
    函数(Sheets)删除重复行。
  5. 按日期排序。

OFX/QIF Files

OFX/QIF文件

  • OFX files are XML-based. You can open them in a text editor to inspect, or import directly into GnuCash, Quicken, or YNAB.
  • QIF files are plain text. Each transaction starts with
    D
    (date),
    T
    (amount),
    P
    (payee). You can convert QIF to CSV with online tools like qif2csv.com.
  • OFX文件基于XML格式。你可以用文本编辑器打开查看,或直接导入GnuCash、Quicken或YNAB。
  • QIF文件是纯文本格式。每条交易记录以
    D
    (日期)、
    T
    (金额)、
    P
    (收款人)开头。你可以使用qif2csv.com等在线工具将QIF转换为CSV。

Important Notes

重要说明

  • Chase CSV exports use negative amounts for payments/credits and positive for charges. Wilson normalizes this (negative = expense, positive = income).
  • Amex CSV has amounts where charges are positive. Wilson inverts the sign on import.
  • OFX files contain a date range in the header — Wilson uses this to scope deduplication.
  • Deduplication is based on date + amount + description. If you manually edited a transaction description in your bank's app, the edited version may import as a new record.
  • Large imports (1000+ transactions) are batched in groups of 500 for performance.
  • Chase的CSV导出文件中,付款/贷方金额为负数,消费金额为正数。Wilson会对此进行标准化(负数=支出,正数=收入)。
  • Amex的CSV文件中消费金额为正数。Wilson在导入时会反转符号。
  • OFX文件的标题中包含日期范围——Wilson会以此限定去重的范围。
  • 去重基于日期+金额+描述。如果你在银行应用中手动编辑过交易记录的描述,编辑后的版本可能会作为新记录导入。
  • 大规模导入(1000+条交易记录)会按500条为一组分批处理以提升性能。