By Pedro


2016-10-14 07:23:43 8 Comments

I'm using Epplus to put a formula into a cell. If I put this formula manually into the Excel cell it works:

=SUM(E4;G4)

But when I put in code with Epplus it doesn't work:

xls.ActiveSheet.Cells(8, 4).Formula = "SUM(E4;G4)"

Is there something special needed when I SUM two cells? If I do the same with a range of cells it works, but with specific cells not.

This works (Range):

xls.ActiveSheet.Cells(8, 4).Formula = "SUM(E4:G4)"

1 comments

@VDWWD 2016-10-22 14:49:49

Try changing this

xls.ActiveSheet.Cells(8, 4).Formula = "SUM(E4;G4)";

into

xls.ActiveSheet.Cells(8, 4).Formula = "SUM(E4,G4)";

Somehow using ; in a formula messes things up. Could be a bug...

Related Questions

Sponsored Content

26 Answered Questions

[SOLVED] Why not inherit from List<T>?

1 Answered Questions

[SOLVED] C# EPPlus not evaluating formula SUM(A3:B3)

  • 2018-12-31 18:14:19
  • T_Zacks
  • 254 View
  • 0 Score
  • 1 Answer
  • Tags:   c# excel epplus

1 Answered Questions

[SOLVED] Excel, EPPlus, Formulas not properly evaluated

  • 2018-06-06 12:42:43
  • Jerome Reinländer
  • 249 View
  • 0 Score
  • 1 Answer
  • Tags:   c# excel epplus

1 Answered Questions

[SOLVED] EPPlus and Excel's Camera Tool

  • 2017-10-01 18:51:47
  • sports
  • 291 View
  • 6 Score
  • 1 Answer
  • Tags:   c# epplus

2 Answered Questions

[SOLVED] Formula not calculating with EPPLUS

  • 2015-07-20 09:57:51
  • Kᴀτᴢ
  • 4744 View
  • 0 Score
  • 2 Answer
  • Tags:   c# excel epplus

3 Answered Questions

[SOLVED] Merge cells using EPPlus?

5 Answered Questions

[SOLVED] Try-catch speeding up my code?

2 Answered Questions

Array formula in EPPLUS

  • 2016-02-01 06:50:25
  • ancailliau
  • 1069 View
  • 0 Score
  • 2 Answer
  • Tags:   c# .net excel epplus

2 Answered Questions

[SOLVED] EPPlus not Inserting Formula Correcty

  • 2015-05-05 20:02:59
  • Kyle Johnston
  • 4156 View
  • 2 Score
  • 2 Answer
  • Tags:   c# excel epplus

Sponsored Content