nissl-lab / npoi

a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.
Apache License 2.0
5.67k stars 1.42k forks source link

Can't copy sheet's chart when using sheet copy function #1319

Closed NewBeeCxd closed 4 months ago

NewBeeCxd commented 4 months ago

NPOI Version

2.7.0.0 for .net

File Type

Upload the Excel File

[test.zip](https://github.com/nissl-lab/npoi/files/15106279/test.zip)

Reproduce Steps

Issue Description

Here are issues when copy the sheet which has charts.

  1. Open Workbook which has sheet , it has some charts.
  2. Call IWorkbook.CloneSheet(sheet_index) function.
  3. Save and close.
  4. Open in excel, show message file is broken. excel try to fix it. after fix finish. Charts are missing in copied sheet.

-Using ISheet.CopyTo(wb,name,true,true)

  1. Open Workbook which has sheet , it has some charts.
  2. Call ISheet.CopyTo(wb,name,true,true) function.
  3. Save and close.
  4. Open in excel, it open normally, but copied sheet's charts are lost.
tonyqus commented 4 months ago

duplicate with #1300