poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48325] New: bad text 'Page &P of &N' and similar errors when reading in spreadsheets
Date Wed, 02 Dec 2009 03:41:08 GMT

           Summary: bad text 'Page &P of &N' and similar errors when
                    reading in spreadsheets
           Product: POI
           Version: 3.5-FINAL
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: regression
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: trejkaz@trypticon.org

We have seen this error in logs from customer sites, which prevent getting the
text out (HeaderFooter only has API for getLeft(), getCenter() and getRight(),
and all three throw the exception:

Caused by: java.lang.IllegalStateException: bad text 'Page &P of &N'.
    at org.apache.poi.hssf.usermodel.HeaderFooter.getLeft(HeaderFooter.java:87)
    at com.nuix.util.LazyCompositeReader.isReaderAvailable(SourceFile:93)
    at com.nuix.util.LazyCompositeReader.read(SourceFile:40)
    at com.nuix.util.LazyCompositeReader.read(SourceFile:42)
    at com.nuix.data.util.CachingReaderFactory.readFully(SourceFile:201)
    at com.nuix.data.util.CachingReaderFactory.createReader(SourceFile:104)
    ... 14 more

We have seen the same thing with '&A' as well.

This is a regression from before 3.5 beta 6, when these methods used to
silently return null instead.  However I'm not sure that returning null is
correct either - what would make the most sense is to match the behaviour of
Excel in this situation, which is presumably to treat all the text as if it's
the left or the center (but which?)

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message