Announcement

Collapse
No announcement yet.

Data compare - Ignore whitespace/text moves

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data compare - Ignore whitespace/text moves

    I am dealing with a monster excel document sport schedule (26 columns x 596 lines) in which the majority of the space is unimportant white space, with boarders to mark groups of cells containing relevant information.

    The problem is that when an item moves up/down, or flip-flops within a boardered section of cells, BeyondCompare reads it as changed, when it really is the same information in the same section, just a line higher/lower or in a different order.

    For example, the document might say:
    "Sat, Dec. 1 - Texas @ Kansas, USC @ Cal";
    and then it switches to:
    "Sat, Dec. 1 - USC @ Cal, Texas @ Kansas".

    They are the same games for the same date, but it is marked as changed because the order is different.
    Similarly, if Dec. 1 marks lines 568-583, and the Texas @ Kansas game was first on line 568 and now is on 579, the entire section is marked as changed, when really it is still the same game for the same date just moved up/down.

    Is there a way to tell Beyond Compare to ignore this type of change?

    Please help!

  • #2
    Hello,

    There is not a way to configure the former change as unimportant. You could use a script to pre-process your data into a unified format (so it is always the same order), but BC3 does not have this capability. You could mark the entire cell or text block as unimportant, but that would ignore any change, not just a reordering.

    For the later, a difference in line number should be handled in the Data Compare if a Key column is defined. This would sort your rows by the Key, and align by the Key. The default is column 1, but you can right click and set any column or columns as Key. The Key should be unique and identify the row. A good example would be an "EmployeeID" column, or the combination of both "FirstName" and "LastName" columns (which, together would then form the Key).

    Setting a Key would sort and align the rows, so even if the row shifted in the original file, it would be sorted for comparison.
    Aaron P Scooter Software

    Comment


    • #3
      Learn all about regular expressions and the world will open up to you.

      I just tested it with your example strings, and assuming your data fits the pattern you listed *exactly*, this will work:

      Edit -> Replacement...
      Text to find:
      (.+), (.+)\. ([0-9]+) - (.+) @ (.+), (.+) @ (.+)

      Replace with:
      $1, $2. $3 - $6 @ $7, $4 @ $5

      [ ] Match character case
      [ ] Whole words only
      [x] Regular Expressions

      Side
      (o) Left ( ) Right

      I can't speak to the different-line problem.

      Comment


      • #4
        Text Replacements is a great feature offered in our Text Compare session type. The Data Compare does not currently support this. If you or others would like to open Data Compare files in the Text Compare, you would lose the ability to sort on just the Key (unless, that was your pre-process External Conversion), but could ignore differences like this.

        Thanks, Aiken, for the example.
        Last edited by Aaron; 27-Mar-2013, 09:31 AM. Reason: Thanks!
        Aaron P Scooter Software

        Comment

        Working...
        X