How to get char(13)&char(10) in Excel ?

Answered How to get char(13)&char(10) in Excel ?

  • jeudi 22 juin 2006 08:03
     
     
    I got string in excel to covert HTML by VB.NET but when i got a string with alt-enter(enter row in excel) i used this code
    str = str.Replace(vbcrlf,"<br>")
    to replace any crlf in string in excel but this code not work.
    Anyone help me ?

Toutes les réponses

  • jeudi 22 juin 2006 08:29
    Modérateur
     
     Traitée
    I believe Alt+Enter in Excel is not Chr(13)+Chr(10). I think it is only Chr(10) = vbLf.
  • jeudi 29 juin 2006 03:03
     
     
    Oh i know that but i tryed but can't get return of excel
    thats problem!!!
  • jeudi 29 juin 2006 06:41
    Modérateur
     
     
    I'm sorry, I don't understand. In your original question you showed you're trying to substitute <br> for vbCrLf. I tell you Excel does not use vbCrLf, it uses vbLf. In what manner does this not work?
  • vendredi 1 juin 2007 15:29
     
     

    Hi,

     

    I cant use CHAR (10) to get a new line within a cell?

     

    Can anyone help me here?

     

    Thank you.

     

    Bernard

  • vendredi 1 juin 2007 16:44
    Modérateur
     
     
    No, you can't. Did you read the entire thread carefully?
  • vendredi 9 novembre 2007 01:03
     
     

     

    The Alt+Enter works fine for text entries in a field. However, when you use the concatenate function, we get an unrecognized character symbol, instead of the carriage return.

     

    What does it take to get a carriage return concatenated between 2 strings?

  • vendredi 9 novembre 2007 08:18
    Modérateur
     
     

    For help on how to use functions in Excel, and other questions related to using Excel as an end-user, you should go to the newsgroup interface. This forum is specifically targeted at the Visual Studio .NET developer technology VSTO. Here's the newsgroup for Excel functions:

     

    http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.excel.worksheet.functions&lang=en&cr=US

  • jeudi 29 avril 2010 22:56
     
     Réponse proposée
    I realise this answer is years late, but the issue here is that for the CHAR(10) to function, the cell has to have "Wrap text" enabled.
    • Proposé comme réponse Jonathan Skarda mercredi 21 juillet 2010 22:13
    •  
  • mercredi 3 août 2011 03:13
     
     
    I realise this answer is years late, but the issue here is that for the CHAR(10) to function, the cell has to have "Wrap text" enabled.

    Thank you :-) save me the minutes of reading indirect responses in this thread!
  • vendredi 8 juin 2012 09:19
     
     
    Thank you. You saved my day. :-)
  • mardi 23 octobre 2012 17:41
     
     
    Thank you! THis saved my day too! Appreciate the response.