ADS

News!! Comparing Two Text Files - Using Excel

This article is virtually comparing ii text files, making a listing of the differences between them together with categorising each difference according to whether yous aid virtually it or not.   An Excel file tool (available for download) is used, because this helps alongside making the terminal list.

The tool was made to dorsum upward comparing ii Blogger templates,as portion of Seven Simple Steps to a Snazzy New-look Blog.  But it tin in conclusion used for many different types of file-comparisons where yous involve to call upward virtually the between the files, hold rails of private differences, together with excogitation actions based on them.



In theory, yous tin compare ii text-files concern past concern manually. But inward practice, peculiarly when the files are made from code similar HTML together with non English-language sentences, this is rattling hard to do:  fifty-fifty a one-character difference may in conclusion significant, but hard to see.

There are many existing tools that testament compare ii files.   But a spreadsheet flora only every flake adept - together with it has other features that tin in conclusion used to assistance alongside making a plans based on the differences found, together with tracking progress alongside fixing them.

I've laid only nearly notes virtually where to laid the comparing text files, together with how to exercise the formulas into the spreadsheet, together with only nearly detailed pictures below.  But the primary dot is that when yous honour a difference yous involve to:
  • Work out where the difference ends, 
  • Insert only nearly blank cells inward the other column thence that the code lines upward again,
  • Re-copy the comparing formulas into column F (because the insert testament bring mis-aligned the existing ones),
  • Make notes virtually differences every flake they are constitute - this listing is important for deciding what to do next.

    Preparing to compare text files


    Get the ii template files that yous wishing to compare, together with opened upward them alongside a text editor (eg Notepad).

    They testament await ugly together with hard to slice of work this - this is ok, the following pace puts them inward a amend format.

    A text file, viewed inward Excel together with 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 at that topographic dot are contents from either of rootage files.





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

    In the spreadsheet the prison home house cellphone is shaded red, together with yous cannot come upwardly across it unless yous await inward the formula bar  (this makes the pictures easier to read). 


    Doing the Comparison


    In Column F, await for the get-go row when "Not the same" is displayed.

    Look at the code for that line, together with work out what caused the difference, together with whether it's is due to a customisation that yous made together with wishing to keep, or private that yous don't wishing to keep, or something else that Google bring done inward the meantime.

    If the difference is due to a customisation that yous wishing to keep, together with together with then make notes virtually this into the Comments together with ToDo columns.





    In the number shown, the get-go difference concern is a meta-tag, which I do wishing to keep, but the 2nd is only the tag-close command:  I don't involve to laid it separately into my plan, thence it's marked "no".

    Re-match the lines of code
    If the difference was due to extra code, then
    • insert only nearly extra rows inward the other column thence that the matching code lines upward again, AND
    • re-copy the comparing forumula into the rows from at that topographic dot down.



    Repeat these steps until all the differences are understood.

    At the end, re-create the comments together with notes columns into only nearly other worksheet, together with exercise Excel's multifariousness functions to extract a listing of the differences that yous involve to instruct by with.

    (I similar to exercise Excel to hold lists of planned changes likewise - but that's a whole different topic.)



    Related Articles


    Making a test-blog for testing template changes

    Seven simple steps to a snazzy new-look blog.

    Showing a PowerPoint presentation every flake a slideshow inward your website

    Planning changes to your weblog - inward private

    Subscribe to receive free email updates:

    ADS