string str = worksheet.Cells["E22"].Formula;
str = str.Replace("AAA()", "1");
str = str.Replace("BBB()", "2");
str = str.Replace("ccc()", "3");
//str.Substring(
worksheet.Cells["E22"].Formula = str;
//ep.Workbook.Properties.SetCustomPropertyValue
ep.Save();
//ep.SaveAs(new FileInfo(fileName));
//worksheet.Cells["E22"].Formula = "1";
//worksheet.Cells["E22"].Formula.Insert(1, str);
Console.WriteLine(worksheet.Cells["E22"].Formula);
用这段代码我可以把公式替换了,但是我不知道怎么保存了~ 请会玩EPPlus的指导下,我是刚用这个,对于EPPlus以前也根本不了解~ 但是客户要求用这个做,没办法~~愁啊..
------解决方案--------------------
没怎么用过,仔细瞅瞅源代码吧,里面应该有介绍