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
{{ message }}
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.
If you reference another cell, for example =$A$1, or have a formula with such references, for example =SUM($A$1:$A$5), and then copy the cell with your formula so that the reference without the $ would be out of the bounds of the Excel sheet by at least 2, the formula in the copied cell will be #REF. So if you have the simple formula =$A$1 in cell B3 and then you call worksheet.Cells["B3"].Copy(worksheet.Cells["B2"]); everything is fine and in B2 the formula will be =$A$1, but if you call worksheet.Cells["B3"].Copy(worksheet.Cells["B1"]);, the content of B1 will simply be #REF.
The attackment contains a full VS project showing the issue. The used template file also shows the results if you copy through Excel directly.
EPPlus 4.5.3.2 - .NET Core 2.1 and EPPlus 4.5.3.1 - .NET Framework 4.5.2
If you reference another cell, for example =$A$1, or have a formula with such references, for example =SUM($A$1:$A$5), and then copy the cell with your formula so that the reference without the $ would be out of the bounds of the Excel sheet by at least 2, the formula in the copied cell will be #REF. So if you have the simple formula =$A$1 in cell B3 and then you call
worksheet.Cells["B3"].Copy(worksheet.Cells["B2"]);
everything is fine and in B2 the formula will be =$A$1, but if you callworksheet.Cells["B3"].Copy(worksheet.Cells["B1"]);
, the content of B1 will simply be #REF.The attackment contains a full VS project showing the issue. The used template file also shows the results if you copy through Excel directly.
FormulaCopyOutOfRange.zip
The text was updated successfully, but these errors were encountered: