Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Bank of America CSV to QIF Converter

Since Bank of America ended support for exporting qif format data files, I found the need to convert their account csv file export function to qif files. This script accomplishes that goal.

This script automates the conversion of Bank of America Credit Card CSV exports into QIF (Quicken Interchange Format) files, specifically using the !Type:CCard header. It prints to the console details about the process, including the number of rows in the CSV file, the data in each row, and whether the file was written successfully.

The script was developed from Fabrizio's excellent csv2qif script. However, instead of command line inputs, the script uses a config file and places the converted qif files in the same folder as the source csv files.


1. Setup Requirements

Python 3.8+ Download csv2qif.py and config.cfg

File Structure

Ensure the script and configuration file are placed in the same directory-folder:

  • csv2qif.py (The Python script)
  • config.txt (The configuration file)

Configuring the Path

  1. Open the file named config.txt in the script's folder.
  2. Inside config.txt, enter the relative path to the folder containing your CSV files. The relative path starts with your chosen base folder ie Taxes:
    • Example: ../../Taxes/Tax 2026/Line Items/
    • The script automatically handles spaces and directory levels.

2. How to Run

macOS / Linux

  1. Open Terminal.

  2. Navigate to the folder:

    cd path/to/your/folder
  3. Run the script:

    python3 csv2qif.py

Windows

  1. Open Command Prompt or PowerShell.

  2. Navigate to the folder:

    cd C:\path\to\your\folder
  3. Run the script:

    python csv2qif.py

3. What the Script Does

  • Scanning: It reads the directory specified in config.txt and finds all .csv files.

  • Validation: It skips empty files and rows that do not meet the minimum column requirements (5 columns).

  • Formatting: It maps CSV columns to specific QIF tags:

  • D: Date

  • N: Reference Number

  • P: Payee

  • A: Address/Memo

  • T: Amount

  • Visual Logs: Displays a clean, tabular summary of processed transactions in the console.

  • Output: Generates a .qif file for every .csv file processed, saving it in the same target directory.


4. Error Handling

  • Missing Config: If config.txt is not found, the script will alert you and stop.
  • Invalid Path: If the directory in the config file doesn't exist, the script will report "Target directory not found."
  • Processing Errors: If an individual row is corrupted or formatted incorrectly, the script catches the exception and continues to the next file.

About

This script automates the conversion of Bank of America Credit Card CSV exports into QIF (Quicken Interchange Format) files, specifically using the !Type:CCard header.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages