You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Robert Lowe <rm...@rmlowe.com> on 2003/10/28 15:24:38 UTC
RE: russian characters
> Is it possible to create excel documents that will contain russian
> characters with encoding wincp1251?
Yes and no.
You can create Excel files containing any Unicode characters, including
Russian.
But you don't get to choose the encoding, it has to be UTF-16. That's
specified by the Excel file format, it's not a limitation of POI.
Java represents all Strings internally using Unicode anyway. So, provided
you have your Russian characters in Java String (and how it gets there is
not POI's problem :) ), you can add it to a spreadsheet as follows:
cell.setEncoding(HSSFCell.ENCODING_UTF_16);
cell.setCellValue(myStringContainingRussianCharacters);
Best regards,
Robert Lowe
http://RMLowe.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org