/// <summary> /// 清除单元格公式 /// </summary> /// <param name="range"></param> public static void ClearFormula(this ExcelReference range) { IEnumerable <ExcelReference> cells = range.Cells(); foreach (ExcelReference cell in cells) { //删除公式 XlCall.Excel(XlCall.xlcFormula, ExcelEmpty.Value, cell); } }