+ Reply to Thread
Results 1 to 3 of 3

read txt(csv) file with 68 fields and copy 6 fields to new workbook.

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Thumbs up read txt(csv) file with 68 fields and copy 6 fields to new workbook.

    Hi,

    First of all, if the title is not clear please feel free to propose a better title and I will change it.

    I've got a txt document (which is a kind of csv document). For example data-students.txt and each line has 67 comma's so it has 68 fields.
    I'm only interested in the following field nr's:
    field 66, 67, 68, 7, 8, 9 which are the ID, Name, address, postalcode, city, countrycode

    So I'd like to save these 6 fields(columns) in the order I mentioned above in a seperate student-list.txt file also delimeter seperated.
    The first line of data-students.txt can be skipped since it holds different names.
    I'm not even sure if the only way is to use an array or maybe it can be done without. My brain hurts when I think to much about it :-)

    Note: would it make a difference to the script to do the same when the data-students.txt are seperated with semi-comma's and also when it would be saved with semi-comma's.

    Thanks in advance.

    This is what I got so far but maybe you have a better idea/way:

    Please Login or Register  to view this content.





    Greets
    Last edited by gosa; 12-27-2011 at 07:15 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: read txt(csv) file with 68 fields and copy 6 fields to new workbook.

    gosa,

    Give this a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-07-2011
    Location
    Gent, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: read txt(csv) file with 68 fields and copy 6 fields to new workbook.

    Hi tigeravatar.

    Thank you so much.
    I'm able to work further with this.
    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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