Comparing Two Text Files – using Excel

This article is nearly comparing 2 text files, making a listing of the differences betwixt them in addition to categorising each departure according to whether yous attention nearly it or not.   An Excel file tool (available for download) is used, because this helps amongst making the concluding list.

The tool was made to back upwards comparing 2 Blogger templates,as component of Seven Simple Steps to a Snazzy New-look Blog.  But it tin survive used for many dissimilar types of file-comparisons where yous necessitate to recollect nearly the betwixt the files, decease along rails of private differences, in addition to excogitation actions based on them.

In theory, yous tin compare 2 text-files trouble past times trouble manually. But inward practice, particularly when the files are made from code similar HTML in addition to non English-language sentences, this is really difficult to do:  fifty-fifty a one-character departure may survive significant, but difficult to see.

There are many existing tools that volition compare 2 files.   But a spreadsheet industrial plant simply every bit good – in addition to it has other features that tin survive used to assist amongst making a plans based on the differences found, in addition to tracking progress amongst fixing them.

I’ve seat approximately notes nearly where to seat the comparing text files, in addition to how to exercise the formulas into the spreadsheet, in addition to approximately detailed pictures below.  But the master copy signal is that when yous uncovering a departure yous necessitate to:

  • Work out where the departure ends, 
  • Insert approximately blank cells inward the other column hence that the code lines upwards again,
  • Re-copy the comparing formulas into column F (because the insert volition bring mis-aligned the existing ones),
  • Make notes nearly differences every bit they are flora – this listing is of import for deciding what to do next.

    Preparing to compare text files

    Get the 2 template files that yous desire to compare, in addition to opened upwards them amongst a text editor (eg Notepad).

    They volition expect ugly in addition to difficult to piece of job this – this is ok, the adjacent pace puts them inward a ameliorate format.

    A text file, viewed inward Excel in addition to looking ugly

    Download the Excel tool for comparing text-files.

    Paste the contents of the template file from your real blog inward the left-hand column.

    Paste the contents of the template from your test-blog inward the middle column.

    Paste the contents of the comparison formula cell (ie the red-shaded one) into every row where in that place are contents from either of rootage files.

    NB  the comparing forumla is    =IF(D8=A8, “”, “Not the same”)

    In the spreadsheet the prison theater cellphone is shaded red, in addition to yous cannot come across it unless yous expect inward the formula bar  (this makes the pictures easier to read). 

    Doing the Comparison

    In Column F, expect for the get-go row when “Not the same” is displayed.

    Look at the code for that line, in addition to work out what caused the difference, in addition to whether it’s is due to a customisation that yous made in addition to desire to keep, or soul that yous don’t desire to keep, or something else that Google bring done inward the meantime.

    If the departure is due to a customisation that yous desire to keep, in addition to hence make notes nearly this into the Comments in addition to ToDo columns.

    In the illustration shown, the get-go departure trouble is a meta-tag, which I do desire to keep, but the instant is simply the tag-close command:  I don’t necessitate to seat it separately into my plan, hence it’s marked “no”.

    Re-match the lines of code
    If the departure was due to extra code, then

    • insert approximately extra rows inward the other column hence that the matching code lines upwards again, AND
    • re-copy the comparing forumula into the rows from in that place down.

    Repeat these steps until all the differences are understood.

    At the end, re-create the comments in addition to notes columns into approximately other worksheet, in addition to exercise Excel’s form functions to extract a listing of the differences that yous necessitate to bargain with.

    (I similar to exercise Excel to decease along lists of planned changes also – but that’s a whole dissimilar topic.)

    Related Articles

    Making a test-blog for testing template changes

    Seven uncomplicated steps to a snazzy new-look blog.

    Showing a PowerPoint presentation every bit a slideshow inward your website

    Hosting Unlimited Indonesia

    Planning changes to your weblog – inward private