December 14th, 2001, 04:01 AM
How to get linefeeds into Excel cells?
in one of my programs I write out a string into the Windows clipboard for pasting it into an Excel sheet afterwards. In some cases I want Excel to display a linefeed within a single cell. Manually this is done by pressing Alt and Return.
By watching the hex code of an Excel cell containing a linefeed, I found that the content of the cell ist represented by the text in double quotes and \u000a as linefeed ("text1\u000atext2").
The problem is, that if I use \n in my java strings, I surely get the linefeed within the cell but there' s also a visible square at the end of the line. By using a hex editor once again, I found that there is - hanky panky - a \u000a AND a \u000d where there should only be a \u000a.
Can anybody help me with this problem?