Make all R1C1 formula methods parallel for V0 and V1.
diff --git a/EPPlus/ExcelCellBase.cs b/EPPlus/ExcelCellBase.cs
index 05c3fa6..529365c 100644
--- a/EPPlus/ExcelCellBase.cs
+++ b/EPPlus/ExcelCellBase.cs
@@ -1401,8 +1401,6 @@
/// <returns></returns>
internal static string UpdateFormulaReferences(string Formula, int rowIncrement, int colIncrement, int afterRow, int afterColumn, bool setFixed=false)
{
- return "";
- /*
//return Translate(Formula, AddToRowColumnTranslator, afterRow, afterColumn, rowIncrement, colIncrement);
var d=new Dictionary<string, object>();
try
@@ -1461,7 +1459,6 @@
{
return Formula;
}
- */
}
#endregion
diff --git a/EPPlus/ExcelRangeBase.cs b/EPPlus/ExcelRangeBase.cs
index 288ad58..123faa2 100644
--- a/EPPlus/ExcelRangeBase.cs
+++ b/EPPlus/ExcelRangeBase.cs
@@ -1166,6 +1166,19 @@
}
}
}
+
+ /// <summary>
+ /// Gets or Set a formula in R1C1 format.
+ ///
+ public string FormulaR1C1_V1
+ {
+ get
+ {
+ IsRangeValid("FormulaR1C1");
+ return _worksheet.GetFormulaR1C1_V1(_fromRow, _fromCol);
+ }
+ }
+
public string ArrayFormulaAddress
{
get
diff --git a/EPPlus/ExcelWorksheet.cs b/EPPlus/ExcelWorksheet.cs
index 64c0899..ed00419 100644
--- a/EPPlus/ExcelWorksheet.cs
+++ b/EPPlus/ExcelWorksheet.cs
@@ -4228,6 +4228,25 @@
return "";
}
}
+
+ internal string GetFormulaR1C1_V1(int row, int col)
+ {
+ var v = _formulas.GetValue(row, col);
+ if (v is int)
+ {
+ var sf = _sharedFormulas[(int)v];
+ return ExcelCellBase.TranslateToR1C1_V1(Formulas.RemoveDummyFunction(sf.Formula), sf.StartRow, sf.StartCol);
+ }
+ else if (v != null)
+ {
+ return ExcelCellBase.TranslateToR1C1_V1(v.ToString(), row, col);
+ }
+ else
+ {
+ return "";
+ }
+ }
+
internal string GetArrayFormulaAddress(int row, int col)
{
var v = _formulas.GetValue(row, col);