SAS DDE write multiple line in cell -


i want insert multiple line 1 cell, dde does't work directly put '0a'x.

filename xlsheet1 dde "excel|c:\test.xlsx.report!r1.c1:r1.c3" notab; data _null_;     file xlsheet1;     = "test";     b = cat("&sysdate","-", "&systime");      c = translate("hello world", '0a'x, " ",);      put '09'x b '09'x c ; run;     

only first part write in cell.

any advice?

hmm, thought there easier way, simplest thing working:

filename xlsheet1 dde "excel|sheet1!r1c1:r1c1" notab; data _null_;     file xlsheet1;     = cat('="line1 " & char(10) & "line2"');     put a; run;     

basically convert value formula. use formula append text , use excel create carriage return.

for work cell needs formatted 'wrap text' option. in fact, if go cell in excel , use alt-enter manually create carraige return, notice automatically turns on 'wrap text' don't think part optional.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -