excel - EPPlus formula not running - no result -


i trying calculate sum of column using code , not displaying anything.

ws.cells["c51"].formula = "sum(c3:c50)"; 

am missing something? there place needs put? (such after populating cells)

maybe post more of code. shouldnt need equal sign , have looks good. works fine if comment out loop (shows 0 in c51):

[testmethod] public void sum_formula_test() {     var newfile = new fileinfo(@"c:\temp\temp.xlsx");     if (newfile.exists)         newfile.delete();      using (var package = new excelpackage(newfile))     {         //http://stackoverflow.com/questions/30650055/epplus-formula-not-running-no-result         var ws = package.workbook.worksheets.add("sheet1");          (var = 3; <= 50; i++)             ws.cells[string.format("c{0}", i)].value = i*10;          ws.cells["c51"].formula = "sum(c3:c50)";          package.save();     } } 

maybe overwriting cell value in later in logic.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -