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/11/03 19:58:06 UTC
[Bug 63901] New: Method XSSFDrawing.importChart(XSSFChart srcChart)
throws XmlValueDisconnectedException
https://bz.apache.org/bugzilla/show_bug.cgi?id=63901
Bug ID: 63901
Summary: Method XSSFDrawing.importChart(XSSFChart srcChart)
throws XmlValueDisconnectedException
Product: POI
Version: 4.1.1-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: marcin.jendrasik@gmail.com
Target Milestone: ---
Hi,
When I want import the srcChart to the new drawing.
Method XSSFDrawing.importChart(XSSFChart srcChart) throws
org.apache.xmlbeans.impl.values.XmlValueDisconnectedException. Maybe I do
something wrong. This is my code snippet:
Workbook workbook = new XSSFWorkbook(new File("/test.xlsx"));
Sheet sheet = workbook.getSheet("Arkusz1");
XSSFDrawing drawing = ((XSSFSheet)sheet).createDrawingPatriarch();
Workbook workbook2 = new XSSFWorkbook(new File("/test2.xlsx"));
Sheet sheet2 = workbook2.getSheet("Arkusz1");
XSSFDrawing drawing2 = ((XSSFSheet)sheet2).createDrawingPatriarch();
drawing
.getCharts()
.forEach(xssfChart -> {
try {
drawing2.importChart(xssfChart);
} catch (IOException e) {
e.printStackTrace();
} catch (XmlException e) {
e.printStackTrace();
}
});
This is very strange and I don't see any solution.
I read some about this exception and he is thrown when try to write more then
one time the same workbook. These two lines generate exception.
destChart.getCTChartSpace().set(srcChart.getCTChartSpace().copy());
destChart.getCTChart().set(srcChart.getCTChart().copy());
When I do this on the same workbook I have the same result.
Did I do something wrong or this is a bug? This is my first post in ASF
Bugzilla.
Thx
--
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
[Bug 63901] Method XSSFDrawing.importChart(XSSFChart srcChart)
throws XmlValueDisconnectedException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63901
--- Comment #2 from Alain Fagot Bearez <Al...@cua.li> ---
If I remember correctly the patch from
[54470](https://bz.apache.org/bugzilla/show_bug.cgi?id=54470), that I merged
last year, the code was intended to copy a chart from the same workbook.
Unfortunately, your other bug report (63902) points to some issue in that part
also...
--
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
[Bug 63901] Method XSSFDrawing.importChart(XSSFChart srcChart)
throws XmlValueDisconnectedException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63901
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you attach the sample files as well so this can be reproduced by others?
--
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
[Bug 63901] Method XSSFDrawing.importChart(XSSFChart srcChart)
throws XmlValueDisconnectedException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63901
Alain Fagot Bearez <Al...@cua.li> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Alain Fagot Bearez <Al...@cua.li> ---
Fixed by r1886087
--
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