| Author |
Problem in sending csv data to browser.
|
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
When my servlet sends csv data to browser, IE opens the Excel and data is displayed in one cell. It does not recognize the comma ad the cell delimiter. The code is as follows: res.setContentType("application/vnd.ms-excel"); out.println("11,22,33,44"); out.println("aa,bb,de,ee"); out.close(); The first row displays "11,22,33,44" in one cell. The second row displays "aa,bb,de,ee" in one cell. What�s wrong? Thanks.
|
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
|
 |
Kripal Singh
Ranch Hand
Joined: Jul 26, 2001
Posts: 254
|
|
try out.println("11\t22\t33\t44"); out.println("aa\tbb\tde\tee");
|
# Help an unprivileged kid.<br /> Whatever u do will make a difference...<br /> ...to a child's life & ur own #<br /><a href="http://www.cry.org/" target="_blank" rel="nofollow">www.cry.org/</a>
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
Thanks! \t works!
|
 |
 |
|
|
subject: Problem in sending csv data to browser.
|
|
|