Tapatalk

Merge 2 files into 1 CSV file

Merge 2 files into 1 CSV file

4
NewbieNewbie
4

    Jan 28, 2006#1

    I need to merge 2 files into 1 but I need it to take line 1 of file1 and line 1 of file2 comma seperate them and put them on the same line

    Example

    File1

    Code: Select all

    A
    B
    C
    D
    E
    F
    G
    H
    I
    File2

    Code: Select all

    1
    2
    3
    4
    5
    6
    7
    8
    9
    Merged File

    Code: Select all

    A,1
    B,2
    C,3
    D,4
    E,5
    F,6
    G,7
    H,8
    I,9

    6,685587
    Grand MasterGrand Master
    6,685587

      Jan 28, 2006#2

      This can be easily done with UltraEdit.

      1) Open both files and activate column mode. In the second file select all lines at column 1. A thin blue line will show you that have selected all lines in column mode but no character is selected.

      2) Now enter for example ,MOFI. This string is now inserted at begin of all lines.

      3) Select the whole second file now in column mode and copy it to clipboard.

      4) Go to first file and set the cursor in the first line to a column which is surely higher than the column number of the longest line in the first file (column number 200 or so).

      5) Paste the content of the second file now and then turn off column mode and set the cursor to top of the file (line 1, column 1).

      6) Use Trim Trailing Spaces from menu Format.

      7) Use following regular expression replace in UltraEdit style to delete the spaces and the inserted string on everyline.
      The is here used as placeholder for a normal space character!

      Find What: +,MOFI
      Replace With: ,

      That's it. Reads more complicated as it really is. A few seconds for a experienced UltraEdit freak like I with only a few keyboard hits.
      Best regards from an UC/UE/UES for Windows user from Austria