Missing line breaks with Excel

Hello,
  Am downloading certain into Excel using BSP. I am changing response mime type to "application/vnd.ms-excel" and am sending tab-demilited string as data.
  Some of the columns should contain line break within the cell( Mean the Alt-Enter in Excel cell ). I tried using the character code 10 and also 13 for the break. But it did not work.
  How do I cause a line-break in the Excel cell? Any work-arounds??
Thanks.
Srinivas.

Hi Srinivas,
I think you don't have the possibility to add line breaks into a tab seperated file. You rearly had to create an excel file. Unfortenately AFAIK this is not possible in ABAP. I've done this in PHP using the <a href="http://pear.php.net/package/Spreadsheet_Excel_Writer">Spreadsheet_Excel_Writer</a>.
Regards
Gregor

Similar Messages

  • Replace Mac line breaks with Windows linebreaks?

    Is there a simple AppleScript that could process a plain text file created on a Mac and replace the line breaks with Windows-compatible \r\n line breaks?
    I thought this would be a very simple task but have been searching for quite a while and can't find anything.
    Thanks.
    Paul

    There are several approaches to this. Here's one of them:
    set theFile to (choose file)
    set MacText to paragraphs of (read theFile)
    set {oldDelims, my text item delimiters} to {my text item delimiters, (return & linefeed)}
    set WindowsText to MacText as text
    set my text item delimiters to oldDelims
    set outputFile to (open for access theFile with write permission)
    set eof outputFile to 0
    write WindowsText to outputFile
    close access outputFile
    To explain, the first line asks you to choose the file in question - you could use any technique to identify the file, including hard-coding the path or using a drag-and-drop handler.
    The second line gets the current paragraphs and calls them 'MacText'
    The third line saves the current text item delimiters in oldDelims and sets the new text item delimiters to the CR+LF combination.
    The fourth line performs the magic of transforming the file. It does this by coercing the list of paragraphs (obtained in line 2) into a single text block, and it inserts the current text item delimiters between each text item, miraculously giving you CRLF-terminated paragraphs.
    The fifth line restores the text item delimiters to whatever they were before (you don't know what they were, but don't need to know what they were, as long as you restore the previous setting - it's unlikely you want CRLF moving forwards).
    The rest of the script (lines 6 through 9) reopen the file you originally selected, sets the EOF to 0 (effectively wiping the file contents), then writes the CRLF-terminated text to the file and finally closes the file.
    Note that some people might suggest using text item delimiters to break up the original text file on CRs but that would be wrong IMHO. The reason is that 'paragraphs of' can detect and handle both CR and CRLF-terminated paragraphs, leaving you with clean paragraphs into which you insert CRLFs.
    This means that if the file originally had CRLF-terminated paragraphs you'd end up with the same data, but at least there was no harm done.
    In contrast, if you simply searched for CRs and replaced them with CRLFs you could have the situation where you selected a CRLF-terminated file (maybe you didn't realize it was already in the Windows format) and your script would blindly replace each CR with CRLF, meaning you'd end up with CRLFLF combinations, which is very wrong.

  • Copy the contents of Jtabl with line breaks to Excel

    Hi every one,
    In my stand alone application,I am copying the contents of Jtable i.e contents having the line breaks(\n).
    While copying and pasting the contents to Jtable,instead of linebreaks, a square symbol is appearing in the excel along with the line break.line break functionality is happening,but the additional symbol(empty square box) is appearing.
    here is my code:
    S = (String) "\""+mProcessQuestionTestItemTable.getValueAt(rowsselected, colsselected[j])+"\""; S=S.replace("\r\n", "\n").replace("\n", "\r\n");
    stringbuffered.append(S);can anyone help me in this?
    thank you!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I want to copy the contents of Jtable(contents having Line breaks(\n)) and pasting to Excel.
    While pasting the contents to Excel, a box is appearing in the excel.
    To remove the empty square box, i tried the sample code:
    originalstr =(String)"\""+ mProcessQuestionTestItemTable.getValueAt(rowsselected, colsselected[j])+"\"";
    originalstr=originalstr.replace("\r\n", "\n").replace("\n", "\r\n");
    strngBuffere.append(S);
    There will be no box,If i copy the contents of Jtable and pasting in notepad.
    the box is appearing in Excel only.
    can you suggest something to solve this..
    Thank you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Deleting extra forced line breaks with Find/Change

    Ladies and Gentlemen,
    I'm importing word .doc that are text-heavy and the formatting is such that there are lots of extra forced line breaks creating a blank line between paragraphs.
    To avoid manually deleting the extra forced line breaks to eliminate the blank line of space between paragraphs, what are the best steps to doing this an easier way?
    Any advice on clear steps to do it using the find/change option?
    Thanks in advance as always..
    JRH

    Are you talking about two hard returns [Enter] in a row, or a soft and hard return [Shift + Enter] and [Enter]? A forced line break is a soft return, but most Word users would just hit the return key for an empty paragraph to get an empty line.
    In either case, you can do a simple text find change, if GREP intimidates you. Use the special characters menu to enter either two "end of paragraph" or a "forced line break" and "end of paragraph" markers into the find field and a single "end of paragraph" marker into the change field.
    This is included as part of the "Find/change by list" sample script which adds some other common cleanup functions like converting two spaces to one. The advantage to using GREP is it will find any number of consecutive paragraph end markers and convert to one in a single pass, while a text search must be run multiple times to catch the heavy handed author.
    Peter

  • Line break with voice control (dictation)

    Hi there,
    How can I get a line break (or section break) while using voice control (dictation)???
    Thanks a lot!!
    Cheers!
    Boscha
    current device: BB Q10 (OS 10.3.1.1565)
    former device: Bold 9780 (OS 6 - FW 6.0.0.534)
    Carrier: O2-Germany

    When I click the mic icon on my Q10-screen the dictation stops... no line break!
    Please help!!
    current device: BB Q10 (OS 10.3.1.1565)
    former device: Bold 9780 (OS 6 - FW 6.0.0.534)
    Carrier: O2-Germany

  • Insert Line Break with Syndicator

    Hello,
    I have a quite "simple" question: Is it possible to insert a linebreak after a record set using the MDM Syndicator? By default there are some values offered, like ',' or ';' and so on to seperate values, and you can specify seperators by your own. But how to specify a line break?
    Thanks for your replies!
    Andreas

    Andreas,
    As far as I know, there is no support for specifying the line break. The records automatically appear in separate rows (If you are using Flat file as Destination).
    If you still need to specify your own custom character at the end of each line, create a "Custom Item" and enter the required character in the "Formula" for Custom Item and map this custom Item to a newly created destination field (at the end of all destination items).
    Hope this helps,
    Regards,
    Rajani Kumar

  • Workbooks with Excel 2007 and 1 million lines

    Hi all,
    We are unable to use the 1 million lines available with Excel 2007 with the migrated workbooks.  Also, it seems that Excel is saving the files in .xls format, even if the format default in Excel is not set for .xls.
    Does anyone have a solution for this??
    Thanks
    Kathleen

    Hi,
    There are so many posting in SDN for this.
    Refer- Bex and Excel 2007
             Re: 2 BEx Query Limitation
             Re: More records in Bex.

  • Clear or Override Forced Line Breaks?

    This is probably really simple, but I searched the help file and didn't find it.
    - How do you clear all forced line breaks in a paragraph?
    I'm editing text that we thought was fairly final, and I usually work in Preview mode as it's cleaner and easier to see what's going on. But I'm fearful of any forced line breaks that I may not know about that could mess up the paragraph flow after I make changes. The text is fully justified.
    I know I can work in Normal mode and turn on 'View Hidden Characters' to see them. But even with that, they can sometimes be small and hard to see depending on the complexity of the type and how zoomed-in I am.
    - Isn't there a simple key command to override forced line breaks?
    THANKS!

    OK. Thanks. I knew that would be an option, I just think I confused a couple other features with what I was hoping to do.
    I may have been confusing 'Clear Local Overrides' when updating a paragraph style, and the ability to have certain things highlighted (custom tracking/kerning, glyphs, etc.), with an ability to clear forced line breaks with a simple key-command or palette menu item.
    Thanks, though.

  • SSL and line break "\n"

    Hey,
    I have a SSL client/server pair that pass messages between each other. Basically I'm having a problem where any sent message containing a line break are split based on this line break.
    So if I sent "cheese \n monster \n", the server would recieve it as two different commands ("cheese" and "monster), instead of a single string.
    Is this unavoidable? I could replace the line breaks with some other identifier and replace them with line breaks when the message is recieved. But I'd rather try and find a way around this first.
    Thanks in advance :)

    SSL doesn't do anything with line-breaks. Once the SSL handshake has taken place, it's just a Socket. I've used JSSE to transfer all kinds of data, and it doesn't do anything to the data being sent. If your code's behavior has changed after switching to SSLSocket, then I'm quite certain you've changed more than just the socket-type along the way.
    What I'm saying is, if you're using readLine() to read from the Socket stream, then it's going to give you each line in turn - that's what readLine() does, whether your end datasource is a SocketInputStream or a File. If your data has linebreaks in it, then you have two choices - don't use readLine() the way you are, or encapsulate your data as a message. Say, have a "MESSAGE START" at the beginning, and a protocol that says "do readLine() until you see 'MESSAGE END' ", for example.
    Grant
    (Well, there is a third option - have a protocol that breaks in the face of line-ends in the data. But I don't think you want that one...)

  • Single line break

    I want to give line break with <br> tag.
    but since i cannot use single tags i use empty element such as
    ..which is not rendered correctly with Netscape..
    can any one help me by giving me clue as to how to insert break via xsl and which can be correctly rendered by both browsers..
    raju

    I want to insert space in between br and forward slash..
    above infact i left a space..it is not working!!
    Can i some how have line break tag with space in between br and forward slash!
    Thanks for the other tip!!
    Raju
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    is the correct way in your stylesheet.
    Make sure you're using the:
    [b]void processXSL(xsl,xml,PrintWriter)
    api, and not the combination of:
    DocumentFragment processXSL(xsl,xml)
    frag.print(PrintWriter)
    Only the former allows the XSLT processor to do its serialization magic for the HTML output mode.<HR></BLOCKQUOTE>
    null

  • How to avoid line break ( br ) while exporting Interactive report in Excel

    Hi,
    I have a Interative report and I am using Apex download format as CSV.
    I have defined some of the column heading in multiple line using break < br >
    when I export this into the excel sheet..the column heading contains break also..
    - Any idea how to avoid line break while exporting in excel.
    - also how to put the columns heading in BOLD when exported in excel.
    Thanks,
    Deepak

    Hi Jari,
    I tried this but still getting the
    <br>Interactive Report
    Column Attributes Heading - Employee<br>Detail AddressWhen I download the Report in CSV Format
    I am getting the heading with <br>.
    I am looking for heading as - Employee Detail Address // with no <br> tagThanks,
    Deepak

  • Csv excel problems line breaks

    hello there, i am new to cf but i have this report that has a
    csv option for excel.
    but the problem is :
    it has breaks between cells.
    meaining:
    there are rows/records that ar empty
    for example:
    row 1 is filled with columns.
    then
    empty row
    empty row
    then,
    row 3 is filled with columns.
    any ideas?

    You shouldn't have to do anything special in HTMLDB to export data with LF in the text.
    Build your region based on a SQL statement ie:
    Select ID, title, subtitle from document
    On the report attributes page set CSV Output to YES and add a label for the url.
    When you click the CSV url you should get output that looks like this:
    "ID","TITLE","SUBTITLE"
    "1","My Title","My subtitle
    has a line break"
    "2","Title2","My subtitle2"
    Excel or Word should be able to read this file just fine.
    I set up a test at:
    http://www.mydataexpert.us:7777/pls/htmldb/f?p=132:8000
    Michael
    I. Michael Snyder
    Vice President
    CASEtech, Inc
    202-423-4499 (c)
    [email protected]
    ------------------------------

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • Is it possible generate file with line break without add one character?

    Hi all,
    my problem is when i generate a file .txt from ABAP as below:
    "===>start of code<===
    REPORT  zteste_bm.
    TYPES: BEGIN OF ty_line,
             v_char(100) TYPE c,
           END OF ty_line.
    DATA: v_it_final type table of ty_line with header line,
          wa_line type ty_line.
    wa_line-v_char = 'line 1 with 24 positions#line 2 with 24 positions#line 3 with 24 positions'.
    REPLACE ALL OCCURRENCES OF '#' IN wa_line-v_char WITH cl_abap_char_utilities=>cr_lf.
    APPEND wa_line to v_it_final.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename = 'c:     emp     este.txt'
        filetype = 'ASC'
      TABLES
        data_tab = v_it_final.
    "===>end of code<===
    When i go to the file .txt it contains:
    line 1 with 24 positions
    line 2 with 24 positions
    line 3 with 24 positions
    and at the end of each line have a charactere in position 25 that represent CRLF (break line).
    My problem is that character 25. I don´t have it in the file .txt.
    Is it possible in ABAP use CRLF to generate the file .txt but remove them after generated? 
    Thanks!

    Bruno,
    Check the paramteres of GUI_DOWNLOAD FM and observe how the text file is when you set or reset the hightlighted input paramters.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
    *   bin_filesize                    =
      filename                        = g_dskpath
    *   filetype                        = 'asc'
    *   append                          = ' '
    *   write_field_separator           = ' '
    *   header                          = '00'
    *   trunc_trailing_blanks           = ' '
      **write_lf                        = 'X'**
    *  col_select                      = ' '
    *   col_select_mask                 = ' '
    *   dat_mode                        = ' '
    *   confirm_overwrite               = ' '
    *   no_auth_check                   = ' '
    *   codepage                        = ' '
    *   ignore_cerr                     = abap_true
    *   replacement                     = '#'
    *   write_bom                       = ' '
      *trunc_trailing_blanks_eol       = 'X' " X will delete the trailing spaces*
    *   wk1_n_format                    = ' '
    *   wk1_n_size                      = ' '
    *   wk1_t_format                    = ' '
    *   wk1_t_size                      = ' '
    * importing
    *   filelength                      =
    TABLES
          data_tab                    = g_t_temp1[]
    *   fieldnames                      =
    EXCEPTIONS
    file_write_error                = 1
    no_batch                        = 2
    gui_refuse_filetransfer         = 3
    invalid_type                    = 4
    no_authority                    = 5
    unknown_error                   = 6
    header_not_allowed              = 7
    separator_not_allowed           = 8
    filesize_not_allowed            = 9
    header_too_long                 = 10
    dp_error_create                 = 11
    dp_error_send                   = 12
    dp_error_write                  = 13
    unknown_dp_error                = 14
    access_denied                   = 15
    dp_out_of_memory                = 16
    disk_full                       = 17
    dp_timeout                      = 18
    file_not_found                  = 19
    dataprovider_exception          = 20
    control_flush_error             = 21
    OTHERS                          = 22
    if sy-subrc <> 0.
    endif.

  • How to avoid starting a page with line breaks?

    Hello. I've just started to refine my Master's thesis and some of the topics moved up and down as I edited their contents. The problem is that in some cases the topic breaks right after the title, and the rest of the contents just move away to another page. Is there any way to avoid starting a page with line breaks or broken topics?

    At the end of your title, you didn't inserted a line break but a paragraph break (carriage return).
    Acivate the mode "Show hidden characters"
    Select the carriage return (paragraph break)
    Delete it
    Press Shift + return to insert a true line break.
    It may be useful to apply that several times if you inserted several carriage returns between the title and the first filled line.
    Yvan KOENIG (VALLAURIS, France) 15 mai 2011 19:40:14

Maybe you are looking for