Selecting list of columns to ignore in csv file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buser
    New User
    • Jun 2010
    • 2

    Selecting list of columns to ignore in csv file

    Hi,
    I was wondering if anyone can help me with this issue. I tried to search and found following page which is not helpful as Comma Separated format which is inbuilt to beyond compare does not have grammer tab and then if I create a new format it is unclear how that really works and how do I tell it to specify that the files are in csv format.
    Anyways my problem is simple and is in two parts. I have following two files:

    File1.txt
    Country,Time,GMTOffset,Value
    US,10:30:10,+5,50
    UK,20:30:20,+0,50
    AUS,9:30:30,+10,80


    File2.txt
    Country,Time,GMTOffset,Value
    US,10:30:40,+4,50
    UK,20:30:60,+1,50
    AUS,9:30:20,+11,80

    So, differences are the 3rd column (GMTOffset) and the seconds in the Time column.

    Problem 1:
    When I compare the two files how can I specify that I want to ignore column 3 (GMTOffset) when doing the comparison.

    Problem 2:
    When I compare the two files how can I specify to ignore seconds field i.e. in column 2 of csv file ignore the 3rd field in the value which is seperated by ':'. Or something along that sort.

    So, basically when I apply this rules beyondcompare will tell me that the two files are identical.

    Help would be very much appreciated as I am pretty sure that BeyondCompare supports features like that.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    This can be done using our Data Compare session type, with one minor change. In one of your sample files, you list the seconds as :60. This is not a supported time format. If you change your seconds to range from 00 to 59, then these files will work automatically in the Data Compare.

    First, load your pair of files in our Data Compare. Right click the column header for column 3, and change it from a Standard Column to an Unimportant column.

    Then go to the Session Settings, select a cell in the Time row, and Edit it. Set the date tolerance to 59 seconds.

    How does that work for you?
    Aaron P Scooter Software

    Comment

    • buser
      New User
      • Jun 2010
      • 2

      #3
      thanks a lot for that. I knew it was something trivial. I was using Text Compare to do all our comparisons. Thanks about the time as well. This is a great tool.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        If you needed any particular Text Compare functionality, we may be able to get this setup in there as well. However, our Data Compare was built to handle files like this and is pretty easy to setup.
        Aaron P Scooter Software

        Comment

        Working...