Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Convert <br> to Alt+Enter
posted

Hello,

 In few cells of my ultrawebgrid, I have the tag "<br />" for make a new lign in the cell.

When I export this grid, I want to convert this tag for have a new lign in the cell of  my excel export like when a user does Alt and Enter in Excel.

 

I tried to do the following in the CellExporting event: 

 e.Value = e.Value.ToString().Replace("<br />", vbCrLf)
 e.Value = e.Value.ToString().Replace("<br />", vbLf)
 e.Value = e.Value.ToString().Replace("<br />", vbCr)
 e.Value = e.Value.ToString().Replace("<br />", Chr(10))
 e.Value = e.Value.ToString().Replace("<br />", Chr(13))

Thanks in advance