diff --git a/ClosedXML/Excel/XLWorkbook_Load.cs b/ClosedXML/Excel/XLWorkbook_Load.cs index 45d86a7..e29185f 100644 --- a/ClosedXML/Excel/XLWorkbook_Load.cs +++ b/ClosedXML/Excel/XLWorkbook_Load.cs @@ -1176,11 +1176,9 @@ if (cell.CellFormula.Reference != null) { - foreach (var childCell in ws.Range(cell.CellFormula.Reference.Value).Cells(c => c.FormulaReference == null)) - { - childCell.FormulaReference = ws.Range(cell.CellFormula.Reference.Value).RangeAddress; - childCell.FormulaA1 = formula; - } + // Parent cell of shared formulas + // Child cells will use this shared index to set its R1C1 style formula + xlCell.FormulaReference = ws.Range(cell.CellFormula.Reference.Value).RangeAddress; } xlCell.FormulaA1 = formula; diff --git a/ClosedXML/Excel/XLWorksheet.cs b/ClosedXML/Excel/XLWorksheet.cs index 033fd27..e4669c8 100644 --- a/ClosedXML/Excel/XLWorksheet.cs +++ b/ClosedXML/Excel/XLWorksheet.cs @@ -1523,6 +1523,11 @@ public String Author { get; set; } + public override string ToString() + { + return this.Name; + } + public IXLPictures Pictures { get; private set; } public IXLPicture Picture(string pictureName)