You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/08/25 09:26:42 UTC

DO NOT REPLY [Bug 45682] New: HSSFWorkbook cloneSheet fails for sheets with conditional formatting.

https://issues.apache.org/bugzilla/show_bug.cgi?id=45682

           Summary: HSSFWorkbook cloneSheet fails for sheets with
                    conditional formatting.
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: antti.koskimaki@joinex.com


HSSFWorkbook cloneSheet fails for sheets containing conditional formattings. 

Reproduced with 3.1-FINAL-20080629 as well as with latest devel from svn
(3.2-aplha1) 20080825. Seems to introduced with conditional formating changes,
as sheets are cloned correctly with 3.0.2-FINAL-20080204. Stack-trace from
latest SVN.


Exception in thread "main" java.lang.RuntimeException: The class
org.apache.poi.hssf.record.aggregates.CFRecordsAggregate needs to define a
clone method
        at org.apache.poi.hssf.record.Record.clone(Record.java:135)
        at
org.apache.poi.hssf.model.Sheet$RecordCloner.visitRecord(Sheet.java:355)
        at
org.apache.poi.hssf.record.aggregates.ConditionalFormattingTable.visitContainedRecords(ConditionalFormattingTable.java:56)
        at org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:371)
        at
org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:127)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:672)


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


DO NOT REPLY [Bug 45682] HSSFWorkbook cloneSheet fails for sheets with conditional formatting.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45682





--- Comment #3 from Josh Micich <jo...@gildedtree.com>  2008-08-25 12:01:19 PST ---
(In reply to comment #2)
> 
> But at the same time my POI-created conditional formats broke between r688654
> and r688655. Excel says "file error, data may have been lost" when opening and
> all POI-generated conditional formats are missing.

Fixed in svn r688825.

CFHeaderRecord wasn't being properly updated with the number of rules.  junit
added to cover this logic too.


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


DO NOT REPLY [Bug 45682] HSSFWorkbook cloneSheet fails for sheets with conditional formatting.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45682





--- Comment #2 from Antti Koskimäki <an...@joinex.com>  2008-08-25 04:02:45 PST ---
Thanks. Verified that mentioned bug got fixed. 

But at the same time my POI-created conditional formats broke between r688654
and r688655. Excel says "file error, data may have been lost" when opening and
all POI-generated conditional formats are missing. This doesn't depend on
cloning.


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


DO NOT REPLY [Bug 45682] HSSFWorkbook cloneSheet fails for sheets with conditional formatting.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45682


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-08-25 01:33:18 PST ---
Fixed in svn r688655

junit added


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