Is it possible to macro cutting and pasting of columns?

Is it possible to macro cutting and pasting of columns?

1
NewbieNewbie
1

    Jan 10, 2005#1

    I'm pulling my hair out with this one.

    I have a large amount of data recorded from mobile phone base stations, which is in columns.
    The equipment we use to measure the base stations spits out an ascii file which uses semicolons as the delimiter....so far so good, UE can cope with delimiters.
    The mobile phone companies that we collect this data for want to have the columns in different positions. One company wants the scrambler codes first followed by bit error rates, another wants them at the end, etc etc.

    Anyway, I tried recording a macro and started by using UE's "Convert to character delimited fields" which worked great.
    Unfortunately this doesn't show up in the macro, which creates a big problem for me.

    Secondly, when I use the "cut column" and then paste it into a different position, that also doesnt show up so well in the macro, I just this:
    columncut 0
    paste

    When I run the macro, it doesn't cut and paste any of the columns.

    So to summarise, is it possible to create a macro that records "convert to character delimited fields"? and is it possible to cut and paste columns?

    many thanks for reading my blurb :D

    6,675585
    Grand MasterGrand Master
    6,675585

      May 07, 2006#2

      No need to do this with a macro in column mode. A regular expression replace can change the columns of a character delimited file. Well, you have not written an example, so I'm forced to write a general expression.

      The UltraEdit style regular expression replace for swapping the columns of a csv file with the semicolon as separator is:

      Find What: %^([~;]+^);^([~;]+^);^([~;]+^);^([~;]+^);^([~;]+^);^(*^)$
      Replace With: ^2;^4;^6;^3;^1;^5

      This would change:

      aaa in column 1;bbb in column 2;ccc in column 3;ddd in column 4;eee in column 5;fff in column 6

      into

      bbb in column 2;ddd in column 4;fff in column 6;ccc in column 3;aaa in column 1;eee in column 5

      Make sure the last line of the file is terminated with an EOL character (CR LF) or it will fail on the last line of the file because $ means end of line and not end of file.
      Best regards from an UC/UE/UES for Windows user from Austria