Epplus:如何在string连接公式中显示double quaotes

我想在col 1中显示如下内容:

Unique Identifier Display_Reg Year Month Region LO Count 2016_Apr_ENY ENY 2016 Apr Albany 10 2016_Mar_ENY ENY 2016 Mar Albany 11 

我在col 1的Cells中获取值为:

  worksheet_LO.Cells[Rowcount, 1].Formula = "=CONCATENATE(C" + Rowcount + "," +"D" + Rowcount + "," + "B" + Rowcount + ")"; worksheet_LO.Cells[Rowcount, 1].Calculate(); 

上面给了我2016AprEny结果。 如何显示其中的下划线。

目标是在单元中结束这个公式:

 =CONCATENATE(C1,"_",D1,"_",B1) 

为了达到这个目的,你需要把,"_",stringjoin你刚才的连接。 为了做到这一点,我们需要小心,以避免在前面添加另一个字符。

这应该做到这一点:

 worksheet_LO.Cells[Rowcount, 1].Formula = "=CONCATENATE(C" + Rowcount +@",""_"","+"D" + Rowcount + @",""_""," + "B" + Rowcount + ")"; worksheet_LO.Cells[Rowcount, 1].Calculate();