Bug 60642

Summary: clone sheet with graphic images, rects and textboxs
Product: POI Reporter: Metehan MERAL <mmeral>
Component: XSSFAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: major CC: mmeral
Priority: P2    
Version: 3.15-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Sample document

Description Metehan MERAL 2017-01-25 14:12:06 UTC
Created attachment 34673 [details]
Sample document

Dear Sir or Madam,
I cloned a sheet , than I copied its relations and pagesetup options from source sheet to target sheet. But I can't see the relations (etc: graphics images,rects, texboxes.. ) on the new sheet of saved workbook.

wb.cloneSheet(0);
sheet=wb.getSheetAt(1);
for(POIXMLDocumentPart dp:wb.getSheetAt(0).getRelations())
{
	sheet.getRelations().add(dp);
}
sheet.getCTWorksheet().setPageSetup(wb.getSheetAt(0).getCTWorksheet().getPageSetup());

1- Can not copy clone command the relations automatically?
2- If not, how can we clone a sheet completely?

You can look for attached excel document.