Tom Ramcigam (magicmarmot) wrote,
Tom Ramcigam

Getting back my somewhat rusty MFC programming skills. Ding-dang-doodle, it's been a while, at least a handful of years since I've written MFC apps. Hell, I think it was before the Gulag even.

This all came about because I have to do a sort-and-transform on an excel table that's not particularly clean, and is very large. I started to do it by hand, but because I can't see it on the screen all at once and still read the entries in the table, I decided that writing an app to do it would probably not only save my sanity, it would also be less error-prone.

And while I could have just written a console app, I thought "it's been a while since I've done an MFC app", and decided to throw down.

Wow. Lots of stuff I just don't remember and had to look up. And I haven't even gotten to the meat of the transforms yet.

There will be a couple of passes. The first reads in the entire contents of the table. If a cell isn't empty, it looks at the entry to see if it's on a list of entries, case-insensitive. If it isn't, it adds it to the list. At the end, sort the list alphabetically.

The second pass reads each cell, and if the cell entry corresponds to the entry in the list, it places an 'X' in the cell corresponding to the index of the entry of the list.

Then it has to spit out another excel file with the sorted 'X' table. The first row of the table is the sorted entry list, the remaining rows are the rows of 'X' values.

It's actually pretty simple when you break it down into smaller pieces.

Tags: codegeek, work

  • (no subject)

    It finally happened. It had to, really. I was in the bottom two cut from LJ-Idol this week. I made it to the top 50, from some rather larger…

  • Mayville

    "Too many bats in the belfry, eh?" The question came from a small man in the scrubs-and-robe garb of an inmate. He looked a little like a garden…

  • LJ-Idol

    Another batch of entries. Consistently amazed at how good the writing is. Voting is open for…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.