Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting to txt file, how to insert a "Enter" between lines


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

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

Cheers
Ki

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc Bob Reynolds[_2_] Excel Programming 0 March 4th 04 08:52 PM


All times are GMT +1. The time now is 05:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"