Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Find and Replace in a csv-file (only a specified column)

Expand Messages
  • Jody
    Hi Bauke, ... The Replace in Block... had some problems , so I reworked it. You can only do one column at a time. I still need to do more work, because as
    Message 1 of 12 , Sep 1, 2004
    View Source
    • 0 Attachment
      Hi Bauke,

      >I'm looking for a clip that makes it possible to do a 'find & replace'
      >in one or more columns within a csv-file.

      The Replace in Block... had some problems <g>, so I reworked it.
      You can only do one column at a time. I still need to do more
      work, because as is, it deals with the whole field in each row.
      That is to say that it won't replace parts of a field, but the
      whole field. For instance, if you have a field with the date in
      it and only wanted to change the year from "2004" to "04" it
      won't do that right now, but will later after I do some other
      things. :) It will only change the full date 08/10/2004 >
      08/10/04 Just download the noteblock.zip w/o the Clipbar below
      for now.

      You might be interested in trying out my Library called NoteBlock
      which works specifically with delimited files. You can sort by
      fields (column), delete fields, reorder fields, and more... As
      always, use on a test document first to ensure there are no bugs. ;)

      http://www.notetab.net/zip/noteblock.zip <-- Contains only the Library
      http://www.notetab.net/zip/noteblockbar.zip <-- Contains the Library plus
      Clipbar w/ buttons

      Block, field, and column are used interchangeably in the Library.

      >Bauke (Netherlands; sorry for my English)

      What's to be sorry for; it's good! :)


      Happy Clip'n!
      Jody

      www.clean-funnies.com, http://www.fookes.us/maillist.htm

      Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
      UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
      Options: http://groups.yahoo.com/group/ntb-clips
    • Jody
      Hi Patricia, ... That s a tall order! :) I don t know if I will have the time for this one - it d be pretty difficult or at least time consuming to do, but I
      Message 2 of 12 , Sep 1, 2004
      View Source
      • 0 Attachment
        Hi Patricia,

        >I have data bases with individuals whose dates of birth and death
        >in various forms --
        >
        >15 May 1900
        >May 15, 1900
        >May 1900
        >1900
        >
        >I would like to sort the data by year and would like to separate
        >the day, month and year into separate columns. The purpose would
        >be to sort the material by date of birth.

        That's a tall order! :)

        I don't know if I will have the time for this one - it'd be
        pretty difficult or at least time consuming to do, but I would
        need to see a few rows of the data. You can dummie the names or
        any other data you don't want published, but leave the fields
        intact. I also need the fields that you send in shown as you want
        it corrected to. In the rows as they are, I need one example of
        each date format that you have like if the four above it all of
        them, then I'd need examples of those four full rows. The dates
        will need to be reformatted into the same format (as much as
        possible) and the month converted into a number (and then back
        after sorting). All that would be done by the Clip of course.

        Is now:
        15 May 1900
        May 15, 1900
        May 1900
        1900

        Needs to be something like:
        1900 May 15
        1900 May
        1900

        Happy Clip'n!
        Jody

        www.clean-funnies.com, http://www.fookes.us/maillist.htm

        Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
        UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
        Options: http://groups.yahoo.com/group/ntb-clips
      • Jody
        Hi Bauke, ... The quotes there are part of the delimiter. Is that what you want to replace or is there actually other text where 1 is and it is within that
        Message 3 of 12 , Sep 1, 2004
        View Source
        • 0 Attachment
          Hi Bauke,

          >"Oli";"Full name shgdfhgdh";"Address";"1";"City";"Shortname";"textfield";"0"
          >"MdV";"Full name";"Address";"2";"City";"Shortname";"textfield-can be
          >long";"1"
          >
          >What I would like to do is to take away the quotes in field 4
          >(find & replace just in field 4), but I have more files and
          >sometimes I want to do a F&R in field 3 and 7 for example.

          The quotes there are part of the delimiter. Is that what you want
          to replace or is there actually other text where "1" is and it is
          within that that you want the quotes removed? That is what I was
          speaking of when I gave the date example in my previous post that
          I need to still do yet, that is, replace text within each field,
          not the whole field. As it is now it will replace the whole field
          with something else if the field is what is searched for in that
          column.

          Happy Clip'n!
          Jody

          www.clean-funnies.com, http://www.fookes.us/maillist.htm

          Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
          UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
          Options: http://groups.yahoo.com/group/ntb-clips
        • Jody
          Hi Bauke, ... I have NoteBlock:Replace in Block fixed now so that it will make replacements within a field/column, at least with common delimiters. It s really
          Message 4 of 12 , Sep 1, 2004
          View Source
          • 0 Attachment
            Hi Bauke,

            >"Oli";"Full name shgdfhgdh";"Address";"1";"City";"Shortname";"textfield";"0"
            >"MdV";"Full name";"Address";"2";"City";"Shortname";"textfield-can be
            >long";"1"
            >
            >What I would like to do is to take away the quotes in field 4 (find &
            >replace just in field 4), but I have more files and sometimes I want to
            >do a F&R in field 3 and 7 for example.

            I have NoteBlock:Replace in Block fixed now so that it will make
            replacements within a field/column, at least with common
            delimiters. It's really a pain doing some of the things when
            quotes are involved due to a bug in NoteTab dealing with
            variables and quotes, delimiters also.

            I didn't hear back from you about whether you wanted to actually
            remove the quotes around the "1" in your field 4 or not. It is
            actually part of the delimiter and I did not make the Clip to
            remove those. That can be done with a regular expression easier
            probably so long as your file isn't super large.

            You might be interested in trying out my Library called NoteBlock
            which works specifically with delimited files. You can sort by
            fields (column), delete fields, reorder fields, replace in
            fields, and more... As always, use on a test document first to
            ensure there are no bugs and you should have a backup. ;)

            http://www.notetab.net/zip/noteblock.zip <-- Contains only the Library
            http://www.notetab.net/zip/noteblockbar.zip <-- Contains the Library plus
            Clipbar w/ buttons

            Block, field, and column are used interchangeably in the Library.

            Happy Clip'n!
            Jody

            www.clean-funnies.com, http://www.fookes.us/maillist.htm

            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
            Options: http://groups.yahoo.com/group/ntb-clips
          • Alec Burgess
            Bauke & Patricia (with Jody s forbearance I hope) Both these tasks can be done with Jody s clip stuff and/or purpose-built clips I think, but if what you
            Message 5 of 12 , Sep 1, 2004
            View Source
            • 0 Attachment
              Bauke & Patricia
              (with Jody's forbearance I hope)

              Both these tasks can be done with Jody's clip stuff and/or purpose-built
              clips I think, but if what you really want is to get the job done without
              necessarily becoming a clip maven :-) there is a freeware program designed
              to work with CVS files which amongst many other very neat manipulations will
              do find and replace in specific columns.

              Have a look at:
              CVSed http://home.hccnet.nl/s.j.francke/software/software.htm

              FWIW: this was originally recommended to me by David Elliot on one of the
              Notetab lists (probably OFF-TOPIC) where any future discussion of this
              program should more properly be directed.

              Regards ... Alec
              --


              ---- Original Message ----
              From: "Patricia Tidmarsh" <patricia@...>
              To: <ntb-clips@yahoogroups.com>
              Sent: Wednesday, September 01, 2004 10:48
              Subject: [gla: Re: [Clip] Find and Replace in a csv-file
              (only a specified column)
            Your message has been successfully submitted and would be delivered to recipients shortly.