You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by ji...@acer.com.au on 2004/06/22 08:45:22 UTC

Problems in HSSFWorkbook setRepeatingRowsAndColumns().

Hi all,

When I try to use the "setRepeatingRowsAndColumns" method in HSSFWorkbook
object, it seems doed not work for me.

But when I instance a new HSSFWorkbook instead of instance it from a
existing xls file, it works.

Can any one tell me why?

The code are bellow:

    // Get the tempolate here
    byte[] template = XLSDatabaseRetriever.getXLS(url.toString());

    ByteArrayInputStream is = null;

    try {

      // Create POI file system
      is = new ByteArrayInputStream(template);
      POIFSFileSystem fs = new POIFSFileSystem(is);

      // Create the work book
      _workbook = new HSSFWorkbook(fs);

      _workbook.createSheet("Main");

      // Create the the repeating print area
      _workbook.setRepeatingRowsAndColumns(_workbook.getSheetIndex("Main"),
-1, -1, 0, 0);
 }catch (Exception e) {}

Regards
Jimmy Zhang

Application Engineer
e-Business Division
Acer Computer Australia Pty Ltd
Tel: (612) 8762 3072
Fax: (612) 9764 2588
Email: jimmyz@acer.com.au



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


Re: Problems in HSSFWorkbook setRepeatingRowsAndColumns().

Posted by Danny Mui <da...@muibros.com>.
if this is a repeatable bug, can you please create junit to test for 
this failure and submit it bugzilla?

Thanks

jimmyz@acer.com.au wrote:

> Hi all,
> 
> When I try to use the "setRepeatingRowsAndColumns" method in HSSFWorkbook
> object, it seems doed not work for me.
> 
> But when I instance a new HSSFWorkbook instead of instance it from a
> existing xls file, it works.
> 
> Can any one tell me why?
> 
> The code are bellow:
> 
>     // Get the tempolate here
>     byte[] template = XLSDatabaseRetriever.getXLS(url.toString());
> 
>     ByteArrayInputStream is = null;
> 
>     try {
> 
>       // Create POI file system
>       is = new ByteArrayInputStream(template);
>       POIFSFileSystem fs = new POIFSFileSystem(is);
> 
>       // Create the work book
>       _workbook = new HSSFWorkbook(fs);
> 
>       _workbook.createSheet("Main");
> 
>       // Create the the repeating print area
>       _workbook.setRepeatingRowsAndColumns(_workbook.getSheetIndex("Main"),
> -1, -1, 0, 0);
>  }catch (Exception e) {}
> 
> Regards
> Jimmy Zhang
> 
> Application Engineer
> e-Business Division
> Acer Computer Australia Pty Ltd
> Tel: (612) 8762 3072
> Fax: (612) 9764 2588
> Email: jimmyz@acer.com.au
> 
> 
> 
> ---------------------------------------------------------------------
> 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