We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Line Break in Cells and '' as leading Character

Hi, i have problem with LineBreak in Cells and a Leading ''. when i Try to insert the following text in Range it does not Appear correctly: lrange.Text = "''Test with LineBreak." & vbcrlf & " this should appear in a new Row" The Range has a named CellStyle applied on it. when i open this Excel File you can see the Leading '' and the text in cell is in one line. When i enter the cell in edit mode and press enter, the cell is diaplayed as desired. Thanks for your help. Best regards. Kai wAchter

1 Reply

AD Administrator Syncfusion Team July 13, 2005 03:39 PM

Hi Kai, Please set wraptext property to true. Here is a sample code snippet mySheet.Range("A1").Text = "Hello" & Constants.vbLf & "World" mySheet.Range("A1").CellStyle.WrapText = True Thanks, Stephen. >Hi, > >i have problem with LineBreak in Cells and a Leading ''. > >when i Try to insert the following text in Range it does not Appear correctly: > >lrange.Text = "''Test with LineBreak." & vbcrlf & " this should appear in a new Row" > >The Range has a named CellStyle applied on it. >when i open this Excel File you can see the Leading '' and the text in cell is in one line. >When i enter the cell in edit mode and press enter, the cell is diaplayed as desired. > >Thanks for your help. > >Best regards. > >Kai wAchter

Loader.
Live Chat Icon For mobile
Up arrow icon