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 2019/10/11 17:18:50 UTC
[Bug 63475] XSSFRow.copyFromRow failed at cross-sheet copy trying
utilize FormulaShifter
https://bz.apache.org/bugzilla/show_bug.cgi?id=63475
Paul Bilnoski <pa...@bilnoski.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from Paul Bilnoski <pa...@bilnoski.net> ---
Here is a simple test case that attempts to copy data across sheets at the same
row index:
try (XSSFWorkbook wb = new XSSFWorkbook())
{
XSSFSheet first = wb.createSheet();
XSSFRow row = first.createRow(0);
row.createCell(0).setCellValue("Value");
XSSFSheet second = wb.createSheet();
second.copyRows(Collections.singletonList(row), 0, new CellCopyPolicy());
}
catch (Exception e)
{
/* poi-ooxml-4.1.0.jar
java.lang.IllegalArgumentException: amountToMove must not be zero
at org.apache.poi.ss.formula.FormulaShifter.<init>(FormulaShifter.java:80)
at
org.apache.poi.ss.formula.FormulaShifter.createForRowCopy(FormulaShifter.java:118)
at org.apache.poi.xssf.usermodel.XSSFRow.copyRowFrom(XSSFRow.java:623)
at org.apache.poi.xssf.usermodel.XSSFSheet.copyRows(XSSFSheet.java:2938)
*/
throw new IllegalStateException(e);
}
--
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