Hello list,
I'm using poi-2.5.1-final to generate an excel sheet with 92 columns - text,
numbers, booleans and dates.
The problem occurs, if I use the UTF_16 encoding (which I need for chinese
letters), but not if I use HSSFCell.ENCODING_COMPRESSED_UNICODE.
Excel completely refuses to open the
schrieb Tobias Meyer [EMAIL PROTECTED]:
Hello list,
I'm using poi-2.5.1-final to generate an excel sheet with
92 columns -
text,
numbers, booleans and dates.
The problem occurs, if I use the UTF_16 encoding (which I need for
chinese
letters), but not if I use
AFAIK Excel does not support two fonts in one cell. Try doing thin in excel
itself...
As workaround (maybe it's cleaner anyways...) try settung your Cell's
encoding to UTF-16 and use the Unicode character \u2211 (Sum) or maybe the
Greek Sigma \u03A3, if the Sum Symbol is not in your Font.
i.e.:
We have had several issues with IE and downloads as well.
I'll try to summarize:
1. Cacheing:
If the cacheing is completely disabled ( setHeader(Expires, 0) and alike -
not 100% sure what header exactly triggered this ), IE will refuse to write
the file to disk - at least when using SSL secured
You can use
Region region = new Region(rowStart, (short)(colStart), rowEnd,
(short)(colEnd));
sheet.addMergedRegion(region);
To add a merged region.
To check, if a row contains a merged region you propably need to use
sheet.getMergedRegionAt(index)
and test if your current row is
You should use cell.setEncoding(HSSFCell.ENCODING_UTF_16).
HSSFCell.ENCODING_COMPRESSED_UNICODE is - as far as I understood - UTF16
with the high byte chopped off and the name of the field is completely
misleading...
The Data should not be in any encoding. ( i.e. not any special encoding,
java
You should create your sheet in the workbook. If you just create a java
object, how is POI supposed to know to which workbook it should belong to.
i.e. use:
workbook.createSheet(name)
instead of :
new HSSFSheet(name);
and all should be fine...
Hth,
Tobias
-Original Message-
From:
for Excel to properly handle non-ASCII characters cou need to specify
HSSFCell cell;
cell.setEncoding(HSSFCell.ENCODING_UTF16);
or something like that - I am quoting from the top of my head here - for
each cell that contains a special character.
Search this list - it has been discussed before.