Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to output tab character in <c:out

843840Feb 12 2008 — edited Feb 19 2008
Here is the problem, and I would appreciate your help. I am trying to output text data to Excel. The data must be tab-delimeted.
This works:

<%response.setContentType("application/vnd.ms-excel");
String sCsv = "aaa\tbbb\tccc\txxx<br>";
out.print(sCsv);%>

But when I try to use <c:out, it fails:

<c:out value="aaa\\tbbb2c&#09;cc3x\txxg\\\taaaa"/>

As you see, I am trying to get tabulation in different ways, but all of them fail. Excel always reads the text in one column. Is there anyway I can insert tab-symbol and use it with <c:out?
Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2008
Added on Feb 12 2008
6 comments
297 views