https://issues.apache.org/bugzilla/show_bug.cgi?id=53798
Priority: P2 Bug ID: 53798 Assignee: dev@poi.apache.org Summary: negative row shift causes corrupted data or throws exception Severity: critical Classification: Unclassified OS: Windows Vista Reporter: an...@mailplus.pl Hardware: PC Status: NEW Version: 3.9-dev Component: XSSF Product: POI Created attachment 29298 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29298&action=edit NegativeShiftBug.java Hi All, I found a bug in the XSSF implementation of Sheet.shiftRows() method which causes either a corrupted data for the shifted row in xlsx file or throws org.apache.xmlbeans.impl.values.XmlValueDisconnectedException depending on a scenario. It can be observed in the following scenarios: Result: corrupted data in the shifted row 1) negative shifting row(s) by less than -1 2) after a negative shift = -1 (less than -1 see above) attempt to create a new row IN PLACE of a removed row by a negative shift causes corrupted xlsx file with unreadable data in the negative shifted row. Result: thrown org.apache.xmlbeans.impl.values.XmlValueDisconnectedException 3) once a negative shift has been made any attempt to shift another group of rows (note: outside of previously negative shifted rows) by a POSITIVE amount causes POI exception org.apache.xmlbeans.impl.values.XmlValueDisconnectedException. NOTE: another negative shift on another group of rows is successful, provided no new rows in place of previously shifted rows were attempted to be created as explained above. Please see the attached NegativeShiftBug.java in combination with template .xlsx file illustrating the problem. Please NOTE that HSSF shiftRows() implementation has none of the problems discussed above. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org