Yes it seems to work for xlsx and ods. However, it does not work for xls; the file created cannot be read by Excel without error, maybe because the BIFF format does not support it? It is possible to re-enter the formula in Excel (I have v2016), but when saving it tells that it cannot write the formula and must modify it. Looking at the written xls file with the BIFFExplorer it can be seen that the formula identifier code has been written as value 255, and a "defined name" record has been created with the value "_xlfn.IFERROR". fpspreadsheet does not support defined names, so far. But since Excel does not seem to be able to assign any code to it, it does not matter. It is my impression that 255 is the identifier for "formula unknown". My question is: where did you get the value INT_EXCEL_SHEET_FUNC_IFERROR=370 from?
xlsx and ods files, however, can be written correctly. Since they are more important than xls, I applied your code to the svn version.