The brokerage that administers our company 401K downloads transaction data in
the QIF format only. They only support downloading all transactions without
specfying a date. So being an angry developer I started writing a conversion
program in C# to convert the QIF into OFX and to automatically track and
eliminate duplicate data. I have the QIF format and the OFX spec but I was
wondering if Money has an SDK anywhere that would speed up the process for
me. I have an MSDN Universal subscription but did not see anything in there.
Thanks

Re: Money SDK for QIF format converter? by Dick

Dick
Fri Feb 04 10:05:40 CST 2005

See http://umpmfaq.info/faqdb.php?q=10.

"AngryDeveloper" <AngryDeveloper@discussions.microsoft.com> wrote in message
news:2CB6FFD2-28E3-4B18-AC25-85B95AF96C0B@microsoft.com...
> The brokerage that administers our company 401K downloads transaction data
in
> the QIF format only. They only support downloading all transactions
without
> specfying a date. So being an angry developer I started writing a
conversion
> program in C# to convert the QIF into OFX and to automatically track and
> eliminate duplicate data. I have the QIF format and the OFX spec but I
was
> wondering if Money has an SDK anywhere that would speed up the process for
> me. I have an MSDN Universal subscription but did not see anything in
there.
> Thanks



Re: Money SDK for QIF format converter? by via_newsgroup

via_newsgroup
Fri Feb 04 10:28:19 CST 2005

In microsoft.public.money, AngryDeveloper wrote:

>The brokerage that administers our company 401K downloads transaction data in
>the QIF format only. They only support downloading all transactions without
>specfying a date. So being an angry developer I started writing a conversion
>program in C# to convert the QIF into OFX and to automatically track and
>eliminate duplicate data. I have the QIF format and the OFX spec but I was
>wondering if Money has an SDK anywhere that would speed up the process for
>me. I have an MSDN Universal subscription but did not see anything in there.

http://xl2qif.chez.tiscali.fr/xl2qif_en.php has some good stuff.

Make sure to make the FITID the same each time the same transaction
is presented. Derive from the amount, date, payee perhaps, with a
caveat:

Be careful to allow for two identical-looking transactions being in
the same QIF when you hit the cash machine twice for the same amount
in the same day or buy that second cup of coffee with a credit card.




Re: Money SDK for QIF format converter? by AngryDeveloper

AngryDeveloper
Fri Feb 04 11:45:05 CST 2005

Thanks for the links and the advice, I will hit both links this evening.
In my particular situation I only have to worry about 401K transactions
(buy,sell,loan, etc...) for the mutual funds that they allow us to invest in.
So most of the OFX transactions will consist of either BuyMF and/or SellMF
transactions along with a few others. When I get it completed and working I
will post the code into the CodeProject for everyone to use.
AngryDeveloper

"Cal Learner-- MVP" wrote:

> In microsoft.public.money, AngryDeveloper wrote:
>
> >The brokerage that administers our company 401K downloads transaction data in
> >the QIF format only. They only support downloading all transactions without
> >specfying a date. So being an angry developer I started writing a conversion
> >program in C# to convert the QIF into OFX and to automatically track and
> >eliminate duplicate data. I have the QIF format and the OFX spec but I was
> >wondering if Money has an SDK anywhere that would speed up the process for
> >me. I have an MSDN Universal subscription but did not see anything in there.
>
> http://xl2qif.chez.tiscali.fr/xl2qif_en.php has some good stuff.
>
> Make sure to make the FITID the same each time the same transaction
> is presented. Derive from the amount, date, payee perhaps, with a
> caveat:
>
> Be careful to allow for two identical-looking transactions being in
> the same QIF when you hit the cash machine twice for the same amount
> in the same day or buy that second cup of coffee with a credit card.
>
>
>
>

Re: Money SDK for QIF format converter? by via_newsgroup

via_newsgroup
Fri Feb 04 11:54:35 CST 2005

In microsoft.public.money, AngryDeveloper wrote:

>The brokerage that administers our company 401K downloads transaction data in
>the QIF format only. They only support downloading all transactions without
>specfying a date.

If you import QIF as a statement in later versions of Money, the
duplication checking should remove duplicates. Do you see otherwise?



Re: Money SDK for QIF format converter? by AngryDeveloper

AngryDeveloper
Fri Feb 04 13:41:10 CST 2005

I recently purchased Money 2005 Deluxe for the first time (Nice Rebate).
I tried to import the transactions QIF file that I download from my 401K
company. As I started maping the transactions to stock sysbols I noticed
that Money would continue to prompt me for mappings no matter now many
transactions where in the file. After 2 hours of trying to import this data
I got Angry!

1. I wrote a C# object to read the QIF file and convert it to an XML
document.
2. Created an XSL document and ran the XML thru the XSLT processor and
generated BuyMF transactions in the format indicated in the OFX spec (based
on the examples).
3. This weekend I will create the XSLT for the SellMF transactions.
4. The QIF file contains a fund description but not the stock symbol so I
will either map that using entries in App.Config or see if there is a Web
Service that I can call to generate possible stock symbol choices.
5. Figured I would add the ability to screen duplicate transactions while I
was at it because the Money 2005 user guide indicated that you have to remove
duplicates that occur when there is no FITID (thanks for that idea by the way
I intend to OR the hash values from the description,units,price and date
fields to generate the FITID).

By the time I'm done I should no longer be quite as angry and the other
employees here will be able to use this for either Quicken or Money.
Ideas and Suggestions appreciated
AngryDeveloper -- Solving the worlds problems one hack at at time.

"Cal Learner-- MVP" wrote:

> In microsoft.public.money, AngryDeveloper wrote:
>
> >The brokerage that administers our company 401K downloads transaction data in
> >the QIF format only. They only support downloading all transactions without
> >specfying a date.
>
> If you import QIF as a statement in later versions of Money, the
> duplication checking should remove duplicates. Do you see otherwise?
>
>
>

Re: Money SDK for QIF format converter? by via_newsgroup

via_newsgroup
Fri Feb 04 14:22:27 CST 2005

In microsoft.public.money, AngryDeveloper wrote:

>
>By the time I'm done I should no longer be quite as angry and the other
>employees here will be able to use this for either Quicken or Money.
>Ideas and Suggestions appreciated
>AngryDeveloper -- Solving the worlds problems one hack at at time.

You might find a thing I wrote for experimentation of interest.

This was set up as a handler for a datatype QQQ that I made up. The
plan was to save a qif file that was probably in DD/MM/YYYY format
and switch it to MM/DD/YYYY. If the transactions were already
MM/DD/YYYY it would probably leave the data alone. The exception is
that if no DD > 12 with either interpretation, it could not deduce
the existing format, so would just flip it. It was just
experimental. I did not have an actual need.

At the end it sends its munged output on to mnyimprt.exe as a QIF
file. I actually got it to work.

If you were looking for an expedient solution to your problem, you
could just strip entries with date < a parameter. You are looking
beyond expedient.

In Perl, variables need not be declared. Non-array variables start
with "$" and are initially 0 or "" as appropriate.

===============================qifmmdd.pl=========================
#!/usr/bin/perl
#
# This program is completely public domain with no warrantee.
# This program is not hardened against attack and could allow
# hacker access if they got you to import a fake QIF file.
# This relies on Perl being installed on your computer.
# One suitable install is available as ActivePerl from
# http://activestate.com/Perl.plex In addition, in this file
# a line must be hard modified to match path a on your system.
# That is near the bottom.
# Also, a modified path to perl.exe and this file must be placed in the
# file types for QQQ filetype Open action if you want automatic launch
# from websites.

# $DEBUG variable must be 0 to pass the modified file to mnyimprt.exe.
# 1 or 2 are debug modes.
#
$DEBUG=0;

if ($DEBUG>1)
{ print "Press the Enter key to continue 1\n";
$s=<STDIN>;
}

$srcfile = shift; #read what should be only parameter
if ($DEBUG>0){print "param was \"$srcfile\"\n"}
if (open (SRCFILE, "+<$srcfile"))
{
@line= <SRCFILE>; #read whole file into array
if ($DEBUG>1){print "\$#line=$#line\n"}
for (my $i=0; $i<= $#line; $i++)
{
if ($line[$i] =~ /^D(\d\d)\/(\d\d).*/i)
{
$ff=$1; #first pair of digits
$ss=$2; #second pair of digits
if ($ss>12){$IsMMDD=1} #if first pair big, must be mm/dd/yyyy
file
if ($ff>12){$IsDDMM=1}
if ($DEBUG>1){print "D$ff/$ss found\n"}
}
else {if ($DEBUG>1){print "\$line[$i]=$line[$i]\n"}}

}
# could do more sophisticated test to allow for neither determined
# as it stands, will flip if in doubt.
if ($IsMMDD ){if ($DEBUG){print "File was already MM/DD/YYYY\n"}}
else # gotta flip DD with MM
{
#reset file pointer.
close SRCFILE;
open (SRCFILE, ">$srcfile")||die "Can't reopen $srcfile\n";

for (my $i=0; $i<= $#line; $i++)
{
if ($line[$i] =~ /^D(\d\d)\/(\d\d)(.*)/i)
{
#$ff=$1; #first pair of digits
#$ss=$2; $second pair of digits
if ($DEBUG){print "D$2/$1$3"}
print SRCFILE "D$2/$1$3\n";

}
else
{
print SRCFILE $line[$i];
}

}
}
}
else
{
print "could not open \"$srcfile\"\n";
}

# ***** must modify string to match your path to mnyimprt.exe.

$cmd1=
"\"C:\\Program Files\\Microsoft Money
2005\\MNYCoreFiles\\mnyimprt.exe\"".
" $srcfile";

if ($DEBUG)
{
print "\$cmd1=$cmd1\n";
print "Press the Enter key to continue\n";
$s=<STDIN>;
}
else #not DEBUG
{
$res1=system ($cmd1);
if ($res1)
{

print "\$cmd1=$cmd1\n";
print "command failed. result result was $res1\n";
die "aborting\n";
}

}