+ Reply to Thread
Results 1 to 4 of 4

excel to text with column format

  1. #1
    Registered User
    Join Date
    08-12-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    excel to text with column format

    Hello,

    I have a excel file that I would like to convert it to a text file with some formatting to it's columns. Please see the attached file for the data.

    This is the format for the text file.

    Id 9 chars
    6 filler characters (let's say #)
    last name - 17 chars
    first name - 17 chars
    middle name - 1 char
    6 filler chars
    Address1 - 35 chars
    1 filler char
    Address2 - 35 chars
    1 filler char
    City - 15 chars
    1 filler char
    State - 2 chars
    1 filler char
    zipcode - 5 chars
    13 filler chars

    How do achieve this format?
    Thank you everyone...
    Attached Files Attached Files
    Last edited by xtro; 08-12-2009 at 01:28 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: excel to text with column format

    Hello Xtro,

    Here is a sample of the output from a macro I wrote. Is this close to the output you want?
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-12-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: excel to text with column format

    Hi Leith,

    Absolutely... I think that's exactly what I am looking for. You are awesome!

    Would you please post the macro....

    Thanks again

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: excel to text with column format

    Hello Xtro,

    Here is the macro code. The macro has already been added to the attached workbook. You will need to change the file path and name to what you are using. It is marked in red. If the file already exists, any data will be overwritten. If it doesn't exist, the macro will create it.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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