Skip to Content
author's profile photo Former Member
Former Member

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..

Endwith

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2009 at 10:04 AM

    Hi Nattapash Changpant,

    try to use one of the VBA-Constants:

    vbBack
    vbCr
    vbCrLf
    vbFormFeed
    vbLf
    vbNewLine
    vbTab
    vbVerticalTab
    

    Regards

    REA

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      >

      > Hi Ramy EL-ARNAOUTY ,

      >

      > I'm so sorry for that. I'm very busy rigth now.

      > But thank you very much for your help. I just try your code and and it seems work!.

      >

      > Thank you very much!!.

      > Nattapash C.

      If his suggestion solved your problem, why not give him the points he deserves?

      Rob

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.