Results 1 to 1 of 1
Thread: copy pasting to excel
- 02-17-2009, 09:07 AM #1Member
- Join Date
- Feb 2009
- Rep Power
copy pasting to excel
I would like to use the clipboard to transfer data from my Java program to Excel. When I put "\"line1\nline2\"\t\"line1\nline2\"" on the clipboard, it is supposed to paste in excel as 2 cells each containing 2 lines.
When I paste in excel however, it will paste \r\n into excel instead of just \n; this will cause excel to show a rectangle (unknown character) at the end of the line.
Appearently on windows, if you insert \n into the clipboard it is translated to \r\n. My question is if there's any way to stop this behaviour, so that if I put \n on the clipboard, it will still be \n when I paste and not \r\n?
- By Oktam in forum New To JavaReplies: 6Last Post: 07-21-2010, 09:09 AM
- By Mir in forum New To JavaReplies: 3Last Post: 08-25-2008, 12:44 PM
- By rajeshgubba in forum New To JavaReplies: 4Last Post: 06-14-2008, 03:21 AM
- By hknyo in forum New To JavaReplies: 1Last Post: 06-12-2008, 05:42 AM
- By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 12:05 AM