ExcelWorkbook.Worksheets.Add() copy Worksheet colliding images
Hi, I noticed a strange behaviour when I copy a worksheet: I used the version 5.8.3 and I noticed that the bug found in this old open issue: https://github.com/JanKallman/EPPlus/issues/394. is still true. I tried to update the version to 6.0.3 but now (with the same code) every time that I copy the worksheet return error "System.Collections.Generic.KeyNotFoundException", I checked with debug and the sheet with the correct name is present.
Hi, I tried images in the linked issue, and it seems to work as expected in 6.0.3...
[TestMethod]
public void i638()
{
using (var p1 = OpenTemplatePackage("green.xlsx"))
{
var ws = p1.Workbook.Worksheets[0];
using (var p2 = OpenTemplatePackage("red.xlsx"))
{
p2.Workbook.Worksheets.Add("Green", ws);
SaveAndCleanup(p2);
}
}
}
Can you attach a sample to reproducible the issue you get.
Hi,
I noticed that in the version 5.8.3 the issue was due to two image with the same name in excel and I fixed it changing the name of the images.
In the version 6.0.3 i'm tring to use the command wb.Workbook.Worksheets.Copy("Sheet1", "CopyOfSheet1"); and always returns "System.Collections.Generic.KeyNotFoundException"
OK, seems to work when I try. Can you provide a sample?
Closed due to inactivity/lack of testability.