CreateRPNFormula does not work lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- cpalx · 2014-10-21 02:25 Hello i updates FPspreadsheet and does not work anymore: CreateRPNFormula, RPNCellRange, fekSUM the FPspreadsheet is last svn (20/10/2014) i work in Linux (Kubuntu 64bits 14.04) compiled in QT any idea? ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-21 02:54 I don't know the answer, but I suspect those that do are going to need more information :-) What do you mean by "does not work anymore"? a) Code no longer compiles b) Code compiles, but at runtime an error or exception is raised c) No error or exception, but while an output is expected, none occurs (ie null, empty string or 0 output) d) An output occurs, but it is wrong (ie expected 5, got 4) e) Something completely different (and if so, please explain further :-) ) And chance you can post a small code snippet showing how you're using these functions? ---------------------------------------------------------------------- wp · 2014-10-21 07:26 There has been a major rework of the formula stuff. In order to use RPN functions you have to "use" the unit fpsrpn. Function token identifiers fekXXXX of function names (e.g. "fekSUM") must be replaced by the function name ("SUM") - see the wiki http://wiki.lazarus.freepascal.org/FPSpreadsheet#Using_built- in_operations_and_functions. But most of all, you can apply string formulas directly now, e.g. "SUM(A1:G5)". Sorry for the inconvenience. There's a section in the wiki on incompatible changes http://wiki.lazarus.freepascal.org/FPSpreadsheet#Incompatible_changes. ---------------------------------------------------------------------- cpalx · 2014-10-21 12:09 Thanks, CreateRPNFormula now works, but i dont know howto replace this: Code: [Select]WriteRPNFormula(MyRow, MyCol, CreateRPNFormula( RPNCellRange('F2:F5',   RPNFunc(fekSUM, 1, nil))) ); ---------------------------------------------------------------------- wp · 2014-10-21 12:30 Use 'SUM' instead of fekSUM Code: [Select]  WriteRPNFormula(MyRow, MyCol, CreateRPNFormula(     RPNCellRange('F2:F5',      RPNFunc('SUM', 1,     nil)))   ); Or, use the string formula directly: Code: [Select]  WriteFormula(MyRow, MyCol, 'SUM(F2:F5)'); ---------------------------------------------------------------------- cpalx · 2014-10-21 13:11 thanks