+ Reply to Thread
Results 1 to 8 of 8

Questions about paragraphs in one cell

  1. #1
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Question Questions about paragraphs in one cell

    When there are some paragraphs in one cell, it works well in excel; but when converting the excel to text or html, no paragraph tag is converted. As a result, all paragraphs are in one line. In other words, lines in the excel cell are no longer valid and each cell is just one continuous line in text file.

    Now I have two questions:

    1. How to add tags like <p> or <br> between the lines to keep the paragraph structure in text file too.

    2. How to delete a line in a cell? For instance, deleting any line (in the body of a cell) beginning with a character like "@".

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Questions about paragraphs in one cell

    Hi,

    To answer the first question take a look here

    http://www.ascii-code.com/

    Type something like this in a cell

    ="Hello"&CHAR(13)&"World"

    it will appear as one line, then copy it and paste it into WordPad and it is now two lines
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Questions about paragraphs in one cell

    if you use alt+enter to split the text into more than one line in a cell when pasted into word it retains the same multiline format any way
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Questions about paragraphs in one cell

    Quote Originally Posted by oldchippy View Post
    Hi,

    To answer the first question take a look here

    http://www.ascii-code.com/

    Type something like this in a cell

    ="Hello"&CHAR(13)&"World"

    it will appear as one line, then copy it and paste it into WordPad and it is now two lines
    Thanks for such a useful information oldchippy,
    However, I still see no practical solution. My problem is that two lines in excel are shown one line in WordPad. How can I convert the html tags into excel cells?

    For instance, I need to replace "ENTER" in the excel cells with "<br>".

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Questions about paragraphs in one cell

    think we need to see an example

  6. #6
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Lightbulb Re: Questions about paragraphs in one cell

    Quote Originally Posted by martindwilson View Post
    think we need to see an example
    Ok, imagine the following excel structure

    A B
    Row1 Text of line1.
    Text of line 2.
    Text of line 3.
    Row2 line1 of another cell.
    line2 of the same cell.
    line 3 of the same cell.

    when saving this file as CVS it will appears like

    Row1, Text of line1.Text of line 2.Text of line 3.
    Row2, line1 of another cell.line2 of the same cell.line 3 of the same cell.

    Now if opening such text in a html browser; there will be no paragraph or lines.


    A solution is modify the excel file to

    A B
    Row1 Text of line1.<br>
    Text of line 2.<br>
    Text of line 3.<br>
    Row2 line1 of another cell.<br>
    line2 of the same cell.<br>
    line 3 of the same cell.<br>

    For this purpose, it is needed to deal with every single lines in the body of a cell.

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Questions about paragraphs in one cell

    Hi,

    Why not just save it as a Web page then it keeps the formatting

  8. #8
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Questions about paragraphs in one cell

    Quote Originally Posted by oldchippy View Post
    Hi,

    Why not just save it as a Web page then it keeps the formatting
    because I am talking about many independent rows

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1