Results 1 to 5 of 5
Thread: Chinese characters in Excel
- 08-04-2011, 08:29 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 4
- Rep Power
- 0
Chinese characters in Excel
Hi Thendral,
Were u able to resolve this issue ,
I am also facing the same issue i am having data from database when i am writing it to csv file and open it in excel all values are coming in in a single column whereas rows are coming up , like i am having 4 column and two rows(one header and one value) , now i am getting one column and two rows.
I am using same as above code except not ExcelCSVPrinter and using UTF-16LE
and also changing BOM to little Endian
i am appending values to StringBuffer and then appending values to that.
encoding is UTF-16LE
StringBuffer sb = new StringBuffer();
sb.append("abcd");
sb.append(","); ........
byte[] bytes = sb.toString().getBytes(encoding);
bytes[0] = (byte)255;
bytes[1] = (byte)254;
fileOut.write(bytes);
fileOut.flush();
fileOut.close();
the above code diaplays chinese but columns are not coming , its all in a single column
- 08-04-2011, 08:52 AM #2
Jayashreevmenon, welcome to the forum. In future, please don't post to threads which are long dead, and don't hijack another poster's thread. When you have a question, start your own thread. Feel free to post a link to a related thread.
As your post shows very clearly (... except ... also changing ... columns are not coming), your problem isn't even the same as Thendral's.
db
- 08-04-2011, 09:17 AM #3
Member
- Join Date
- Aug 2011
- Posts
- 4
- Rep Power
- 0
Pardon me , i couldnt get how to post a new thread , could you please help me out in this.
- 08-04-2011, 10:26 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 08-04-2011, 10:51 AM #5
Member
- Join Date
- Aug 2011
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Unable to export chinese character in excel use ExcelCSVPrinter file open inline brow
By Thendral in forum Advanced JavaReplies: 4Last Post: 02-01-2010, 11:13 AM -
Certain Chinese Characters not displayed properly.
By kerwintang in forum Advanced JavaReplies: 1Last Post: 08-21-2009, 05:55 AM -
this looks chinese to me
By xgi1008 in forum New To JavaReplies: 18Last Post: 10-05-2008, 07:03 PM -
Displaying Chinese characters on Swing components
By vaskarbasak in forum AWT / SwingReplies: 3Last Post: 06-26-2008, 08:27 AM -
drawString with Chinese Characters
By vaskarbasak in forum Advanced JavaReplies: 1Last Post: 06-10-2008, 07:49 AM


LinkBack URL
About LinkBacks


Bookmarks