Edward,
char(10) is the correct character to use. It might be being modified when
you write out the file to a type 1/19 file as char(13)char(10).
Try using ASSIGN @TRUE TO SYSTEM(1017) before you write the file. This
should stop UV converting the char(10) character if that's what's happening.

EQU TAB TO CHAR(9), LF TO CHAR(10), CR TO CHAR(13), QT TO '"'
TXT = 123:TAB:QT:'ABC':LF:'DEF':QT:CR:LF:'HIJ':TAB:'JKL':CR:LF
ASSIGN @TRUE TO SYSTEM(1017)
WRITE TXT ON F.FILE,'output.txt'

The problem with Excel, or at least one of the problems, is that it "thinks"
it knows what you are trying to do. Unfortunately, line breaks are
problematic. Trying to read a tab file with line breaks saved from excel
invokes the impotent wizend, oops, i mean import wizard, and ends up
mangling the line break. Opening the file in notepad and copying it to the
clipboard then pasting it to excel does work just fine. Go figure. Even
using html where you would think that a <br> should work as a line break,
doesn't.

If your terminal emulator supports windows objects (SBClient, Host Access,
Wintegrate etc) I reckon using the windows clipboard is the way to go,
transferring tab delimited data to an activex/com spreadsheet. We use
SBClient for this and it works fast and efficiently for us even with very
large amounts of data.

Cheers,
Stuart




-----Original Message-----
On Behalf Of Burwell, Edward

I am creating a tab-delimted file with and xls extension that excel is very
happy to open.  I would like to create a cell that has line-breaks or
Hard-Carriage-Returns in them.
...
it seems to work, however, now there is a visible square right where I put
the char(10)'s!  I get the same result when I use CRLF as well.  When I use
CR only, it doesn't wrap at all.

Any help would be greatly appreciated.













**********************************************************************
This email message and any files transmitted with it are confidential
and intended solely for the use of addressed recipient(s). If you have 
received this email in error please notify the Spotless IS Support Centre (61 3 9269 
7555) immediately who will advise further action.

This footnote also confirms that this email message has been scanned
for the presence of computer viruses.
**********************************************************************

_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to