poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Mui <da...@muibros.com>
Subject Re: Uhm.. Bug with HSSFRow.setHeight??
Date Thu, 01 Jul 2004 16:46:38 GMT
what height do you set to unsupress :)

Roger Misteli wrote:

> Hiyas POI team
> 
> I think there is a bug in HSSFRow.setHeight. When I use this code:
> 
>   private static final short SUPRESS_HEIGHT = 0;
> 
>   public static void main(String[] args) {
>     HSSFWorkbook book = new HSSFWorkbook();
>     HSSFSheet sheet = book.createSheet();
>     for (int i=0; i<100; i++)
>       sheet.createRow(i);
>     for (int i=10; i<20; i++)
>       sheet.getRow(i).setHeight(SUPRESS_HEIGHT);
>     try {
>       FileOutputStream fos = new FileOutputStream("c:\\test.xls");
>       book.write(fos);
>       fos.close();
>     }
>     catch (Exception e) { e.printStackTrace(); }
>   }
> 
> The generated XLS file does indeed contain 10 rows which are hidden.
> However, if I "unhide" those ten rows, they suddenly grow huge.
> According to Excel, the row height for each of the ten is then 409. 
> I use a special version of POI 2.5 but I can verify it with the normal
> 2.5 and 2.0 as well.
> 
> Maybe I overlooked something, but I don't see what I did wrong. The real
> world example I use is more complex, but this sample shows the problem.
> 
> Regards,
> Rog
> 
> /*
>  * Roger Misteli - ABACUS Research AG
>  * email: roger.misteli@abacus.ch (PGP key available)
>  * "If you think the problem is bad now, just wait until we've solved it."
>  */
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
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