Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert to Text File w/Returns (XP)

    One of our users has a worksheet with 8 columns of simple text an numerical data. She would lto 'automatically' convert this file to .txt format, including commands to insert returns or breaks after certain column text. With each row representing a separate record, she wants to break the text on to two lines without having to manually manipulate the way the text wraps. Anyone have any thoughts on how to approach this project? Thanks in advance.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Convert to Text File w/Returns (XP)

    You can create a formula to convert each line, copy it down the column, then paste special - values the concatenated formula to another sheet and then save this sheet as a text file. You would concatenate (&) including the lineFeed [=char(10)] or Carriage return [=char(13)] or both characters and include commas, quote marks etc as desired.

    If you want to automate it you could have a macro read each line and do the "transformation" and write it directly to a text file.

    If you need additional info you will have to provide us with more details to help with a formula approach or a macro approach.

    Steve

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert to Text File w/Returns (XP)

    Believe it or not, we concluded that performing a simple merge in Word - using the Excel worksheet as the datasource - is the most efficient method for achieving what we need. Thanks for the input, though!

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Convert to Text File w/Returns (XP)

    I was going to suggest maybe something simpler - just copy the cells to the clipboard and paste into Word. That would get you a table. Not sure if that's useful since I can't visualize the layout in Excel and what you're trying to achieve. But I thought this would be a good starting point. Mail Merge is good too.

    Fred

Posting Permissions

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