how to compare 2 delimited text files?

Posted on 2009-02-24
Last Modified: 2012-05-06
Is there a way to compare the formatting structure of 2  comma delimited text files?
Question by:zachvaldez
    LVL 2

    Expert Comment

    What do you mean by "check the formatting structure"?

    You can definitely use CSV (comma separated value) files as data sources... you'd need to be able to link the two files together by a common key, which would need to match exactly, and then you could use formulas to test the equality of each field in both files (text match, numerical equality, even length of field or such).

    If this isn't what you mean, let me know, and we'll work on it!

    Author Comment

    The files have.txt extensions and data are separated by ",". for example, "Y',"N","123 N.Apple st",
    with no data, it places (quotes) like " ", " ", etc.

    LVL 2

    Accepted Solution

    If you just want to see if the layout of the two files is the same, not caring about the contained data, I'd suggest opening them up in Excel and taking a look at them. That's probably your best bet for confirming the "structure" is the same. You can even open up both files at the same time, each in it's own window, and check the columns one by one.

    Crystal will tell you if you try to link two different data types together (numeric with string, etc), so you COULD open both files in Crystal and link each and every field together, first with first, second with second, etc. If they don't go together, you'll get a type mismatch error.

    I think it's easier to eyeball them in Excel, though.
    LVL 100

    Assisted Solution

    Another way would be to use them as te source for an Access database table.

    What are you trying to accomplish?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now