poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xuemin Guan <xue...@appresso.com>
Subject Double byte area name: java.lang.ArrayIndexOutOfBoundsException: 5
Date Tue, 19 Aug 2003 09:11:59 GMT
Dear all, I am experiencing a problem with a double-byte
area name(in my case, they are Japanese characters).

Say, I have an area, called X (X comprises of Japanese
characters), defined on a worksheet. Then I did the
following:

1. get the HSSFName object reprenting this area:

HSSFName hssfName = workbook.getNameAt(j);

2. retrieve the area name and reference from
this HSSFName object:

String areaName = hssfName.getNameName(); (expected to be X)

String reference = hssfName.getReference();

I printed out the above 2 Strings, and found the
areaName is scrambled (appears to be "?e"), and the
refrence is of value "#REF!";

Apparently, the thing has got wrong at this stage;

Then,

3. I tried to construct a AreaReference object using the
reference, like this:

areaRef = new AreaReference(reference);

The I got the following Exception:

java.lang.ArrayIndexOutOfBoundsException: 5
	at 
org.apache.poi.hssf.util.CellReference.separateRefParts(CellReference.java:148)
	at org.apache.poi.hssf.util.CellReference.<init>(CellReference.java:72)
	at org.apache.poi.hssf.util.AreaReference.<init>(AreaReference.java:70)


I know the thing actually went wrong before the step 3. But I
don't know the reason, and would like to know if there is any
workaround.

For the time being, the only workaround is to have an English
name(single byte) rather than a Japanese one.

Any one can help on this? Any feedback will be highly appreciated.

Regards,

Xuemin


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message