You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by pa...@post.ch on 2011/05/31 15:37:18 UTC

NullPointerException calling HSSFSheet.setAutobreaks

Hello

I got an exception calling the method setAutobreaks(true) for a sheet HSSFSheet.

    /**
     * show automatic page breaks or not
     * @param b  whether to show auto page breaks
     */
    public void setAutobreaks(boolean b) {
        WSBoolRecord record =
                (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);

        record.setAutobreaks(b); // here the record is null !!!!
    }

The same code was working well with Java 1.5

Any hint why the record is null ?

Thanks in advance.

Cheers,
Patrick Brühlmann

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