
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Carriage Return Within a Cell in Microsoft Excel
Hi community, I would like to share with you a tip, how to create excel files with a carriage return (or line break) in a cell.
you can get around it with a bit of Java String manipulation:
"1st line... "+Code+"2nd line…"
Code = Character.toString ((char) 10) or “\012” or “\n”…
The code I gave you, will provide the carriage return where you want it, but you will need to enable the "Wrap text" in the file using VBA************tFixedFlowInput_2************
Dim objXL
SET objXL = CreateObject("Excel.Application")
WITH objXL
.Workbooks.Open("D:/test/out/Carriage_Return_in_cell.xlsx")
.Worksheets("Users").Range("A1:A15").WrapText = True
.activeWorkbook.save
.activeWorkbook.close
END WITH
SET objXL = Nothing
**************tJava_1*************
Runtime.getRuntime().exec("cmd /c start +((String)globalMap.get("tFileOutputRaw_1_FILENAME_PATH")));
TimeUnit.SECONDS.sleep(1);
File file = new File(((String)globalMap.get("tFileOutputRaw_1_FILENAME_PATH")));
file.deleteOnExit();
NB. On Debian/Ubuntu you can install as follows:
$ sudo apt-get install wine
...
$
To run from command line:
$ wine cscript some-script.vbs
or
$ wine
wscript some-script.vbs
Happy learning,
Kind regards,
😷19.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for sharing this tip with us on Community.
Best regards
Sabrina
