You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the WorkSheet.Add interface, I find that the definition name is copied, missing the workbook name is not copied, and it also raises an error if there is an external workbook link.
I have two workbooks, src1 and src2. In sheet1 of src1, there are formulas that reference src1's sheet2 worksheets and reference the workbook names. In sheet1 of src1, there are conditional format cells that reference src1's sheet2 worksheets. In the dst workbook, Using the WorkSheets.Add method, src1's sheet1 was passed in as a template and ended up with an error in the dst workbook's newSht.
using (ExcelPackage excelPackage = new ExcelPackage("src1.xlsx"))
{
var copiedSht=excelPackage.Workbook.Worksheets[0];
using (ExcelPackage newPackage = new ExcelPackage("dst.xlsx"))
{
newPackage.Workbook.Worksheets.Add("newSht", copiedSht);
newPackage.Save();
}
}
EPPlus usage
Noncommercial use
Environment
Windows
Epplus version
7.4.2.1079
Spreadsheet application
Excel365
Description
When I use the WorkSheet.Add interface, I find that the definition name is copied, missing the workbook name is not copied, and it also raises an error if there is an external workbook link.
I have two workbooks, src1 and src2. In sheet1 of src1, there are formulas that reference src1's sheet2 worksheets and reference the workbook names. In sheet1 of src1, there are conditional format cells that reference src1's sheet2 worksheets. In the dst workbook, Using the WorkSheets.Add method, src1's sheet1 was passed in as a template and ended up with an error in the dst workbook's newSht.
dst.xlsx
src1.xlsx
src2.xlsx
The text was updated successfully, but these errors were encountered: