I'm having an issue with worksheets.copy(from, to) while having an Embedded object (picture in my case)
there is an exception being thrown when saving "Cannot access a closed Stream", properties of Comments and VmlDrawingComments are having this exception on the copied worksheets
how to reproduce
1. create a new excel file with Excel 2007 and stay on sheet1
2. Go to insert
3. Select Object
4. Create from File
5. Select as picture
6. Save
7. Close Excel
run this code on it
```
using exfile as new excelpackage(new fileinfo("excel file from step 1")
exfile.workbook.worksheets.copy("sheet1","copiedSheet")
exfile.save()
end using
```
this will throw a exception and the excel file will be deleted
at least the file should not be lost.
Comments: the issue seem to be around the Using() in the method CopyVmlDrawing in the file ExcelWorkSheets.cs modifying the code to remove the using, so no dispose / close would seem to fix the exception but when the file is opened in excel the embeded picture of the original sheet and the copied sheet are being deleted at that point i'm not familiar with the code to try to fix it myself
there is an exception being thrown when saving "Cannot access a closed Stream", properties of Comments and VmlDrawingComments are having this exception on the copied worksheets
how to reproduce
1. create a new excel file with Excel 2007 and stay on sheet1
2. Go to insert
3. Select Object
4. Create from File
5. Select as picture
6. Save
7. Close Excel
run this code on it
```
using exfile as new excelpackage(new fileinfo("excel file from step 1")
exfile.workbook.worksheets.copy("sheet1","copiedSheet")
exfile.save()
end using
```
this will throw a exception and the excel file will be deleted
at least the file should not be lost.
Comments: the issue seem to be around the Using() in the method CopyVmlDrawing in the file ExcelWorkSheets.cs modifying the code to remove the using, so no dispose / close would seem to fix the exception but when the file is opened in excel the embeded picture of the original sheet and the copied sheet are being deleted at that point i'm not familiar with the code to try to fix it myself