Beispiel #1
0
        /// <summary>
        /// Ensure this function is not running in UDF context. It should be run in macro context.
        /// </summary>
        private void ForceFormulaEvaluate(ExcelReference excelReference)
        {
            string formula  = (string)XlCall.Excel(XlCall.xlfGetCell, 6, excelReference);
            Range  comRange = excelReference.ToComRange();

            if (comRange.HasArray)
            {
                comRange.CurrentArray.FormulaArray = formula;
            }
            else
            {
                comRange.Formula = formula;
            }
        }