Is Excel Alt+Enter Same as Newline Character \N?
I Am Loading Data from Excel Column Which Contain Multiple Lines Separated by Alt+Enter. Can I Use the New Line \N in Java to Match This Alt+Enter in Data...
I am loading data from excel column which contain multiple lines separated by alt+enter. can i use the new line \n in java to match this alt+enter in data loaded from the cells during validation? is alt+enter in excel same as \n ?
2 Answers
The documentation of excel say that alt+enter puts char(10). char(10) is Line-Feed (LF), so it is the same character as \n in java.
\r (CR) and \n (LF), are named after the typewriter actions of pulling the page carriage back to the start and scrolling it up a line.
Alt+Enter in Excel is equivalent to CR+LF in Windows Format. We can check by copying the required text from Excel Cell (containing Alt+Enter) in Notepad++ (check the below snapshot)
Snapshot from Notepad++:
In Excel, Alt+Enter is a Line Break character equivalent to Chr(10)