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 loaded from the cells during validation? is alt+enter in excel same as \n ?

2

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)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest