tags:

views:

35

answers:

1

I am inserting text into a Memo field in a Excel cell via a insert statement using OleDb command object.

When I try to insert a carriage return, char 10, what is displayed is a black square (MS Sans Serif). When I look at the top edit cell (don't know the offical name) the text is formatted correctly with carriage returns.

I am trying to duplicate what happens when a user presses Alt-Enter in a cell.

I have tried \n \r \r\n char.ConvertFromUtf32(10).

Nothing seems to change the text of the cell.

+1  A: 

I'm assuming you meant \n and \r\n?

Also have you tried Environment.Newline?

MikeAbyss
Thanks for the edit. Tried Environment.NewLine that put in the \r\n which came out as two black boxes. And in the edit window a box with a question mark in it and a newline.
Mike