+ Reply to Thread
Results 1 to 14 of 14

Exporting to Text file - values separated by lines

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    PA
    MS-Off Ver
    Excel 2008
    Posts
    5

    Exporting to Text file - values separated by lines

    Hi, I'm looking for a way to export a basic worksheet to a txt file but to separate lines. For example I have a worksheet that is formatted like this:

    Column A Column B Column C
    Dan Cookies 12
    Ryan Pies 15

    And I need to save it to a text file like this:

    Dan
    Cookies
    12
    Ryan
    Pies
    15

    Any help and feedback is appreciated! thank you

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Exporting to Text file - values separated by lines

    just make it comma seperated then open the text file and do find replace comma with return ("\n" in notepad++)("^l" in word)
    Last edited by Leon V (AW); 12-17-2013 at 11:32 AM.

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    PA
    MS-Off Ver
    Excel 2008
    Posts
    5

    Re: Exporting to Text file - values separated by lines

    thank you for your suggestion, I do have a problem in that many of my values include a comma

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Exporting to Text file - values separated by lines

    Try tab-delimited instead then replace tabs with ^p in MS Word
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Exporting to Text file - values separated by lines

    ok then make it tab delimited ("^t" in word)("\t" in notepad++)

    you can delimit it with pretty much any character you want anyway See Here
    Last edited by Leon V (AW); 12-17-2013 at 12:04 PM.

  6. #6
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Exporting to Text file - values separated by lines

    Hi,

    You need some code to do that
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  7. #7
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Exporting to Text file - values separated by lines

    Quote Originally Posted by xlbiznes View Post
    You need some code to do that
    I know you could write doing it in Word into a macro but while we are on the subject can excel do find replace as a shell comand in notepad++?

  8. #8
    Registered User
    Join Date
    12-17-2013
    Location
    PA
    MS-Off Ver
    Excel 2008
    Posts
    5

    Re: Exporting to Text file - values separated by lines

    Thank you all. I'm now saving to tab delimited and opening in Notepad++ where I have a macro set up to find the tabs and replace with Carriage Return and Line Feed:

    find \t
    replace with \r\n

    It would be great to have some code to do it without the extra step but I have no experience with that. thanks

  9. #9
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Exporting to Text file - values separated by lines

    This my solution.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-17-2013
    Location
    PA
    MS-Off Ver
    Excel 2008
    Posts
    5

    Re: Exporting to Text file - values separated by lines

    Quote Originally Posted by xlbiznes View Post
    This my solution.
    Thanks! Where does the file output? Im not able to find it...

  11. #11
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Exporting to Text file - values separated by lines

    It would be in the same path of this xlsm file.

  12. #12
    Registered User
    Join Date
    12-17-2013
    Location
    PA
    MS-Off Ver
    Excel 2008
    Posts
    5

    Re: Exporting to Text file - values separated by lines

    Ah, I opened it from the downloads folder and it got lost. Thanks so much!

  13. #13
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Exporting to Text file - values separated by lines

    You are welcome, glad i could help.

  14. #14
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Exporting to Text file - values separated by lines

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 12-12-2012, 04:01 PM
  2. Count Number Of lines in text files and append values to beginning of file
    By motoxeryz125 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2011, 11:14 PM
  3. [SOLVED] How do I convert an excel file into a comma separated values file
    By Conquerer in forum Excel General
    Replies: 3
    Last Post: 08-17-2006, 04:25 PM
  4. [SOLVED] Read a .xls file and insert its values to certain lines in a text
    By Thegman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2005, 12:15 PM
  5. [SOLVED] how could I import a text file with comma separated values into ex
    By Xavi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-15-2005, 07:05 AM

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