Go Back   CDN Business Directory > Main Category > Microsoft Money

 
 
Thread Tools Display Modes
  #5  
Old 02-04-2005, 07:22 PM
Cal Learner-- MVP
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

In microsoft.public.money, AngryDeveloper wrote:

- quote -

> 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"))
{
[at]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";
}

}

  #4  
Old 02-04-2005, 06:41 PM
AngryDeveloper
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

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:

- quote -

> 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?

  #3  
Old 02-04-2005, 04:54 PM
Cal Learner-- MVP
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

In microsoft.public.money, AngryDeveloper wrote:

- quote -

> 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?


  #2  
Old 02-04-2005, 04:45 PM
AngryDeveloper
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

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:

- quote -

> 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.

  #1  
Old 02-04-2005, 03:28 PM
Cal Learner-- MVP
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

In microsoft.public.money, AngryDeveloper wrote:

- quote -

> 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.



 
Old 02-04-2005, 03:05 PM
Dick Watson
Guest
 
Posts: n/a
Default Re: Money SDK for QIF format converter?

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

"AngryDeveloper" <AngryDeveloper[at]discussions.microsoft.com> wrote in message
news:2CB6FFD2-28E3-4B18-AC25-85B95AF96C0B[at]microsoft.com...
- quote -

> 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



  #-1  
Old 02-04-2005, 02:53 PM
AngryDeveloper
Guest
 
Posts: n/a
Default Money SDK for QIF format converter?

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
 

Tags
converter, format, money, qif, sdk
Similar Threads
Thread Forum Replies Last Post
What database format is used in Money
Jose Luis:
Microsoft Money 8 11-22-2004 03:25 AM
Money's database format
Steve Hanson: I decided to tool around with my old Money files in a binary editor (can't do much else with them). The first thing in the file's header was...
Microsoft Money 5 10-08-2004 03:05 PM
MS Money XML Report Format
Colin Smale: Does anyone know where I can find a formal description of the XML report format Microsoft Money uses when you save a report as XML? I am thinking...
Microsoft Money 1 09-29-2004 08:25 PM
Conversion from .csv format to .qif format
Dave: I am unable to get our brokerage firm to give downloads in .qif or web connect - but they can and do give downloads in excel .csv format. It seems...
Microsoft Money 2 07-21-2004 02:10 AM
Date format in Money 99
Keyser: How could I change the date format to 09 may 2004 in Money 99, I tried the regional settings but I'm not sure which one to use. Thanks
Microsoft Money 1 05-07-2004 02:57 PM



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT. The time now is 08:41 AM.