+ Reply to Thread
Results 1 to 4 of 4

Save trailing empty cells in a tab delimited text file

  1. #1
    Registered User
    Join Date
    04-23-2006
    Posts
    2

    Save trailing empty cells in a tab delimited text file

    Hi,

    I have a tab delimited text file which contains some empty values in some of the cells, and some of the lines have empty cells at the end of the line. In my original file (outputted by some software) empty cells at the end of the line are represnted by a number of '\t' characters with empty strings in between.

    When I open the file to edit it in excel and then resave it, empty cells at the end of a line are not saved.

    An example:
    If this is the original line string (spaces are not part of the string - they just seperate chracters here, for clarity):

    1 \t 2 \t \t \t \n

    Excel will save it as:

    1 \t 2 \n


    I need the file saved in the first format of the example rather then in the second format outputted by excel in order to continue processing it in other software. Any way to do it, if I know in advance how many columns I need in each line?

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Hi,

    You could put $$4$$ in the next empty column, edit the output file in Notepad and Replace All ,$$4$$ with nothing.

    Hope this helps

    --

    Quote Originally Posted by osios
    Hi,

    I have a tab delimited text file which contains some empty values in some of the cells, and some of the lines have empty cells at the end of the line. In my original file (outputted by some software) empty cells at the end of the line are represnted by a number of '\t' characters with empty strings in between.

    When I open the file to edit it in excel and then resave it, empty cells at the end of a line are not saved.

    An example:
    If this is the original line string (spaces are not part of the string - they just seperate chracters here, for clarity):

    1 \t 2 \t \t \t \n

    Excel will save it as:

    1 \t 2 \n


    I need the file saved in the first format of the example rather then in the second format outputted by excel in order to continue processing it in other software. Any way to do it, if I know in advance how many columns I need in each line?

  3. #3
    Registered User
    Join Date
    04-23-2006
    Posts
    2
    Thanks for the idea - I think it would work just fine.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Oh yes, it works, and thanks for the response

    --

    Quote Originally Posted by osios
    Thanks for the idea - I think it would work just fine.

+ 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