npoi SetCellFormula custom formula in VBA

限于喜欢 提交于 2019-12-25 07:04:23

问题


I have an application that fills with data an excel template .Template is .xlsm .In template I created vba function called SumByColor when i try to set a cell formula to this function i get this error :

{"Name 'SumByColor' is completely unknown in the current workbook"}

I set formula like this :

sheet.GetRow(rowIndex).GetCell(startPos + 2).SetCellFormula(string.Format("SumByColor($AQ$7,F{0}:AI{0})",rowIndex+1));

来源:https://stackoverflow.com/questions/25077009/npoi-setcellformula-custom-formula-in-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!