Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! | Excel Discussion (Misc queries) | |||
Make "Edit" mode default, rather than "Enter"? | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |