On Wed, 28 May 2003 20:20:19 +0400
Yury Mikhienko <[EMAIL PROTECTED]> wrote:

> > 
> > YM> Ok, the PDF serializer works properly (but with .ttf fonts only), but what 
> > about the HSSFSerializer?
> > YM> I still does not properly generate the exel document with russian characters 
> > :((
> > 
> > There is the "jakarta-poi-1.7.0-dev-20020624.jar" library in the
> > "cocoon-2.1/src/blocks/poi/lib". It does not support russian
> > characters. The support begins from version "1.8-dev".
> > See "http://jakarta.apache.org/poi/changes.html#1.8-dev";
> > The current version of POI is "2.0-pre1".
> > 

For using the jakarta-poi-1.8.0-dev library in cocoon2.0.4 and Russian support 
implementation,
I have implemented the several changes in  jakarta-poi-1.8.0-dev and in cocoon's hssf 
element processor classes:
(POI -1.8.0-dev )
In jakarta-poi-1.8.0/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
change the following
[122]    private  Vector formats = new Vector();
[123]    private Workbook workbook;
[124]    private boolean movedBuiltins = false;  
to
[122]    private static Vector formats = new Vector();
[123]    private static Workbook workbook;
[124]   private static boolean movedBuiltins = false;  

and following
[251]  public  short getFormat(String format)
to
[251]  public static short getFormat(String format)

(cocoon2.0.4)
In 
cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Row.java
 
change the following
[137] retval.setStyle(_sheet.getCellStyleForRegion(_row.getRowNum(), (short)column));
to
[137] retval.setStyle(_sheet.getCellStyleForRegion((short)_row.getRowNum(), 
(short)column));

and
in 
cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Sheet.java
change the 
[341] return new Row(_sheet.createRow(rowNo), this);
to
[341] return new Row(_sheet.createRow((int) rowNo), this);

and
in 
cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Cell.java
add the 
[120] _cell.setEncoding(HSSFCell.ENCODING_UTF_16);


-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO "Mobicom-Kavkaz"

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to