File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes sql to excel with java character problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

sql to excel with java character problem.

Doug Douglas

Joined: Aug 04, 2011
Posts: 2
Non-English Values are looking like upside with their charsets.

"application/; charset=cp1254";

Values on Excel is : ??? ??? ??? ??? ???

"application/; charset=UTF-8";

Values on Excel is : ÊÖÇÑÈ ÊæŞÚÇÊ ÔåÑ ÃßÊæÈÑ İí ÓæŞ ÇáÜPP

If I open excel and import it with utf-8,values looks great,but everytime opening file with importing is problem for customers. I found this code below written with ASP.NET,but couldnt write with JAVA. Also I am not sure this code will solve my problem.
Response.ContentEncoding = System.Text.Encoding.Default;
Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146


try the example int this thread.

Hope this helps.

The important thing is not to stop questioning.Curiosity has its own reason for existing.
I agree. Here's the link:
subject: sql to excel with java character problem.
jQuery in Action, 3rd edition