<PRE>as follows:
COMPUTE C_CRF/A50 = '<PRE>' | CUSTOMER_REF | '<PRE>';
DEFINE FILE CAR MODEL_CRLF/A50 = STRREP(50, MODEL, 1, ' ', 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 50, 'A50'); MODEL_NOCRLF/A50 = STRREP(50, MODEL_CRLF, 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 1, ' ', 50, 'A50'); END TABLE FILE CAR PRINT MODEL_CRLF MODEL_NOCRLF BY CAR ON TABLE PCHOLD FORMAT EXL2K END
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | ||
WebFOCUS App Studio 8.2.06 standalone on Windows 10 |
Thanks, guess I will just have to push for that upgrade!!quote:Originally posted by N.Selph:
The new version 7.6 is supposed to have a new SET command, that preserves the spaces in HTML and Excel. But I haven't tried it yet.
SET SHOWBLANKS=ON
Hi Tony,quote:Originally posted by Tony A:
Mark,
Are you sure that the data field contains spaces and not carriage returns and/or linefeeds? That would explain the apparent split into two lines (unless you are using WIDTH and WRAP in your stylesheet ).
You can use STRREP to replace any possible combination of chars in a string, even of uneven length.
Unfortunately I do not know if a sample file contains a field with CRLF chars, but you can show the result easily using the CAR file -DEFINE FILE CAR MODEL_CRLF/A50 = STRREP(50, MODEL, 1, ' ', 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 50, 'A50'); MODEL_NOCRLF/A50 = STRREP(50, MODEL_CRLF, 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 1, ' ', 50, 'A50'); END TABLE FILE CAR PRINT MODEL_CRLF MODEL_NOCRLF BY CAR ON TABLE PCHOLD FORMAT EXL2K END
A bit ugly but it shows you what I mean, and you can see that it's just a case of reversing the STRREP components to get what you want.
T