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 08:39 PM UTC

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.
Up arrow icon