Skip to Content
Former Member
Jul 21, 2009 at 07:08 AM

Help! Ineed Line Feed charater but no need Carriage Return


Hi ABAP Guru,

I have a problem and I need your help with writting data into Excel cells using OLE Technique, I have to insert multiple lines of text into sheet header text.

I've record excel macro and got the code below..

With ActiveSheet.PageSetup

blah blah blah..

.CenterHeader = "HEADER LINE 1" & Chr(10) & "HEADER LINE 2" & Chr(10) & "HEADER LINE 3"

blah blah blah..


in the line .CenterHeader = "HEADER LINE 1" & Chr(10) & "HEADER LINE 2" & Chr(10) & "HEADER LINE 3"

means they will have 3 lines in excel sheet header text..

my problem is I can't see any character to use as Chr(10) (in this VB Code) for ABAP..

I already have a look at class CL_ABAP_CHAR_UTILITIES but 'NEWLINE' character not worked, And 'CR_LF' character not worked too.

and I can't use variable Type 'X' to contain value '0A' , because i need to concatenate text with this special characters for the line feed, but ABAP is not allow the 'X' var to used in CONCATENET.

Please give me your advice

Thanks in advanced

Nattapash C.