Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0

    Default 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

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default

    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

  3. #3
    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0

    Default

    Pardon me , i couldnt get how to post a new thread , could you please help me out in this.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,762
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Jayashreevmenon View Post
    Pardon me , i couldnt get how to post a new thread , could you please help me out in this.
    There's a 'Post New Thread' button just above the threads listing.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by JosAH View Post
    There's a 'Post New Thread' button just above the threads listing.

    kind regards,

    Jos

    Thanks I have posted a new Thread

Similar Threads

  1. Replies: 4
    Last Post: 02-01-2010, 12:13 PM
  2. Certain Chinese Characters not displayed properly.
    By kerwintang in forum Advanced Java
    Replies: 1
    Last Post: 08-21-2009, 06:55 AM
  3. this looks chinese to me
    By xgi1008 in forum New To Java
    Replies: 18
    Last Post: 10-05-2008, 08:03 PM
  4. Displaying Chinese characters on Swing components
    By vaskarbasak in forum AWT / Swing
    Replies: 3
    Last Post: 06-26-2008, 09:27 AM
  5. drawString with Chinese Characters
    By vaskarbasak in forum Advanced Java
    Replies: 1
    Last Post: 06-10-2008, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •