+ Reply to Thread
Results 1 to 3 of 3

Exporting to txt file, how to insert a "Enter" between lines

  1. #1
    fidller
    Guest

    Exporting to txt file, how to insert a "Enter" between lines


    Hi
    I need to export a spreadsheet to a text file, (tab delimited) for
    importing into our accounting program (MYOB).
    The accounting program needs an "Enter" between lines to recognize next
    customer.
    How do I do this from within Excel

    I can do it by having a empty cell between each entry, just does not
    seem very elegant

    Cheers
    Kim


    --
    fidllerPosted from http://www.pcreview.co.uk/ newsgroup access


  2. #2
    K Dales
    Guest

    RE: Exporting to txt file, how to insert a "Enter" between lines

    Perhaps I misunderstand: When you save a workbook as .txt, tab delimited,
    there is normally an Enter (CR + LF) between each row from the worksheet, so
    as long as your worksheet data range is arranged in rows the standard "Save
    As" should work, I would think; is there something peculiar about how your
    data is arranged on the sheet, or is there something different that you need
    in the output .txt file?
    --
    - K Dales


    "fidller" wrote:

    >
    > Hi
    > I need to export a spreadsheet to a text file, (tab delimited) for
    > importing into our accounting program (MYOB).
    > The accounting program needs an "Enter" between lines to recognize next
    > customer.
    > How do I do this from within Excel
    >
    > I can do it by having a empty cell between each entry, just does not
    > seem very elegant
    >
    > Cheers
    > Kim
    >
    >
    > --
    > fidllerPosted from http://www.pcreview.co.uk/ newsgroup access
    >
    >


  3. #3
    Gareth
    Guest

    Re: Exporting to txt file, how to insert a "Enter" between lines

    Hi Kim,

    Do you mean you need to have a blank line between each line in the text
    file? Using the SaveAs tab delimited won't normally give you that unless
    (as you have already pointed out) you have a blank *row* between each one.

    As one solution you could force the "Enter" (actually a carriage return
    and a line feed) by inserting it in the last cell of a row by having
    =CHAR(13) & CHAR(10) in the last cell at the end of the row.

    e.g.
    What HowMany HowMuch FakeEnter
    Monkeys 20 500 =CHAR(13) & CHAR(10)
    Giraffes 5 1000 =CHAR(13) & CHAR(10)

    Unfortunately, because these are "special" characters, when you save as
    text it will insert quotes before and after them (try it and see). The
    only way to get around this is to save as Space Delimited (*.prn) - you
    can change the prn extension to txt when you save by typing your
    filename in quotes e.g. "mynewfile.txt". If MYOB can accept this, then
    this should be a good workaround for you.

    Alternatively, you could do this more cleanly using VBA - this is the
    programming NG after all. If you are familiar with VBA and want to try
    that please post back. (Or check out the Open #, Print #, Close #
    functions in VBA help.

    HTH,
    Gareth



    fidller wrote:
    > Hi
    > I need to export a spreadsheet to a text file, (tab delimited) for
    > importing into our accounting program (MYOB).
    > The accounting program needs an "Enter" between lines to recognize next
    > customer.
    > How do I do this from within Excel
    >
    > I can do it by having a empty cell between each entry, just does not
    > seem very elegant
    >
    > Cheers
    > Kim
    >
    >


+ 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