Formula not calculating with EPPLUS

前端 未结 2 1007
不思量自难忘°
不思量自难忘° 2021-01-27 10:13

I would like to transfer a Datatableto excel and calculate a sum. For this I\'m using epplus. Here is my code:

Sheet.Cells[\"A1\"].LoadFromDataTable         


        
2条回答
  •  伪装坚强ぢ
    2021-01-27 11:04

    You should change "SUMME" to "SUM", localized formula names is handled by the Excel GUI. The underlying xml (same as Excel produces) assumes that the formula names are in english.

    From EPPlus Formula calc documentation:

    • Don't use localized function names. Only english names (such as SUM, IF, VLOOKUP, etc) are supported.
    • Don't use semicolon as a separator between function arguments. Only comma is supported.
    • Don't add the leading = sign in your formula. "=SUM(A1:A2)" is wrong, "SUM(A1:A2)" is correct

提交回复
热议问题