DATA Step, Macro, Functions and more

EXCEL dde output containing “CR carriage return or line feed or line break”

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

EXCEL dde output containing “CR carriage return or line feed or line break”

When dde "output" from sas to EXCEL, looking for a method of outputting data to be a new line in the EXCEL file.

 

For example, when I put "ABC" (actually A??B??C) to excel, and open the EXCEL , I want to see it as

A

B

C

kaigyou_abc.JPG

 

"??" is a special code? "'0A'x"?

 

In the Internet,there is a information about How to "read" the EXCEL which including the new line code can be found , but there was no way of "output" or "export". please let me you know with your sample code?

 

Sincerely,t_ar_taat


Accepted Solutions
Solution
‎11-13-2016 04:40 AM
Contributor
Posts: 35

Re: EXCEL dde output containing “CR carriage return or line feed or line break”

It partly depend on EXCEL's Formatting of cell,

 

 

var= '"' || "a" || '0a'x || "b" || '"';

put var;

 

 

 

View solution in original post


All Replies
Super User
Super User
Posts: 7,413

Re: EXCEL dde output containing “CR carriage return or line feed or line break”

What is the code your using to put data out to DDE?  It should be just a matter of sending that special character as well.  However I will point out that DDE is well out of date (17years) and is not supported as such any more, so I would really suggest using one of the many other solutions to get data to Excel:
tagsets.excel

libname excel

proc export

CSV

SAS for Office Addin

Etc. 

Contributor
Posts: 35

Re: EXCEL dde output containing “CR carriage return or line feed or line break”

HI,RW9

Thank you for your comment.

Yes,actually "DDE" is old.I should get away from DDE.

By the way I just find out hint in stackoverflow.

https://stackoverflow.com/questions/32194947/sas-dde-write-multiple-line-in-cell

Solution
‎11-13-2016 04:40 AM
Contributor
Posts: 35

Re: EXCEL dde output containing “CR carriage return or line feed or line break”

It partly depend on EXCEL's Formatting of cell,

 

 

var= '"' || "a" || '0a'x || "b" || '"';

put var;

 

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 307 views
  • 1 like
  • 2 in conversation