+ Reply to Thread
Results 1 to 5 of 5

Convert .tsv file to .xlsx file

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    WInnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Convert .tsv file to .xlsx file

    Hi everyone
    I need to convert a .tsv file to an .xlsx file, but only for selected fields. That is, the original .tsv file has about 100 fields but I want to extract only about 20 of them and create an .xlsx file. I am using Excel 2007, and there are many records.

    I was thinking of using pl/sql or something like that. Can it be done with a macro in Excel, or any other way? - Paul

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Convert .tsv file to .xlsx file

    what's a .tsv file, is it TAB separators?
    Recorded this macro whilst using the Data Import of a text file.
    Not the use of the Array for the TextFileColumnDataTypes property.
    1 denotes general data
    9 denotes skip field.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-21-2011
    Location
    WInnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    My delimiter is a vertical bar

    I think that code may be the kind of thing I need. The "tsv" in .tsv files does actually stand for "tab delimited values" but in my file the delimiter is a vertical bar ( | ), So I guess I would need a line something like
    .TextFile????Delimiter = True
    Where the ???? is "vertical bar" or something. Do you know what it would be? - Paul

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Convert .tsv file to .xlsx file

    macro record says....

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-21-2011
    Location
    WInnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Convert .tsv file to .xlsx file - Working!

    This is working. Thanks Andy! - Paul S =:-D

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1