Closed Bykiev closed 5 months ago
Do you figure out why clonedSheet.AddRelation(rel.Id, r) throws exception?
I believe it's a copy-paste error, but still not 100% sure in my fix, so, it should be reviewed carefully.
In line 419 the relation is not exists and then it's not checked for null, which cause NRE. Because relation is not exists, we shouldn't call this method at all
It seems I was wrong and AddRelation
call shouldn't be removed, just added a null check
So do I have a new version to try?@Bykiev
@cp1319421 NPOI doesn't have nightly build. Please pend the next release. It can be a few month later.
@Bykiev I debug into the code and found that the exception occurs in cloning drawing relationship.
It tried to look for rId1. And drawing1.xml.rels looks like this
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.png"/>
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" Target="../charts/chart2.xml"/>
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" Target="../charts/chart1.xml"/>
</Relationships>
In other words, rId1 is there. For some reason , it's not found. We may have to dig into this.
Closes #346