+ Reply to Thread
Results 1 to 7 of 7

export excel to text file; multiple line cells; no quotes

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    export excel to text file; multiple line cells; no quotes

    Hello, I'm fairly new to macros. Looking to export an excel sheet to a text file. I don't want the file to contain the quotes that excel applies to cells containing sentences/text. I figured that out with this thread:
    http://www.excelforum.com/excel-gene...ut-quotes.html

    This works great, but one problem. I have multiple lines within a single cell (alt + enter). When this exports, notepad shows the "enters" as a square symbol, all on one line. Can any one help me to fix this and make appear as a new line, like how it shows in excel? Even if I just paste these multi-line cells into notepad, same thing happens.
    Thanks

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: export excel to text file; multiple line cells; no quotes

    attach a sample file with multiple lines within a single cell (alt + enter) for testing
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: export excel to text file; multiple line cells; no quotes

    Well... in preparing a sample file, things worked out. For anyone interested, I attached a sample file of what I'm doing: creating g-code tool-paths for a CNC router. Quick g-code generation for different serial numbers. In the macro, I was just playing with .txt extension for export. This file opened in NotePad, which doesn't support the multi-lines in a single cell (screenshot attached). Then I changed to .nc extension in macro, as this is what I will need. This then opened in WordPad and everything looked great

    Anyone know how to reference cells in the macro? So I can save the serial number in the filename (i.e. sample321.nc)? Thanks

    Screen Shot 2012-10-09 at 7.43.02 PM.png

    sample.xlsm

  4. #4
    Registered User
    Join Date
    10-08-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: export excel to text file; multiple line cells; no quotes

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: export excel to text file; multiple line cells; no quotes

    Did you solve ?

  6. #6
    Registered User
    Join Date
    10-08-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: export excel to text file; multiple line cells; no quotes

    I'm just wondering how to reference cells in the macro? So I can save the serial number in the filename (i.e. sample321.nc)? Code I'm currently working with is in last post from me. Thanks!

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: export excel to text file; multiple line cells; no quotes

    why 3 2 1 in different cells ? put serial number in B3 then use this change

    Please Login or Register  to view this content.
    Last edited by patel45; 10-11-2012 at 02:11 AM.

+ 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