Results 1 to 1 of 1
- 08-04-2011, 11:50 AM #1Member
- Join Date
- Aug 2011
- Rep Power
Need to write chinese characters to csv file
The issue is i am having data from database when i am writing it to csv file and when opened 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 UTF-16LE encoding.
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();
byte bytes = sb.toString().getBytes(encoding);
bytes = (byte)255;
bytes = (byte)254;
the above code diaplays chinese but columns are not coming , its all in a single column
Need to display in different columns and also should be comma separated when opened with notepad
- By Jayashreevmenon in forum Advanced JavaReplies: 4Last Post: 08-04-2011, 11:51 AM
- By kerwintang in forum Advanced JavaReplies: 1Last Post: 08-21-2009, 06:55 AM
- By jithan in forum New To JavaReplies: 3Last Post: 02-18-2009, 04:11 AM
- By vaskarbasak in forum AWT / SwingReplies: 3Last Post: 06-26-2008, 09:27 AM
- By vaskarbasak in forum Advanced JavaReplies: 1Last Post: 06-10-2008, 08:49 AM