Apache poi setformula不适用于SE [英] Apache poi setformula doesn't work With SE
问题描述
我正在尝试在带有POI的XSSFCell中设置公式.
I'm trying ti set a formula in a XSSFCell With POI.
Cell.setFormula("SE(D87=0; ""; D80/D87)");
错误是:
名称"SE"在当前工作簿中是完全未知的.
Name 'SE' is completely unknown in the current workbook.
为什么?
推荐答案
您似乎正在尝试创建IF
公式.我发现此页面关于将Excel公式转换为不同语言的信息,发现英文公式名称IF
可以几种语言翻译为SE
.
It looks like you are attempting to create an IF
formula. I found this page about Excel formula translations into different languages, where I found that the English formula name IF
translates to SE
in a few languages.
我不认为Apache POI支持英语以外的其他名称的公式名称.尝试使用英文名称.您可能需要,也可能不需要用逗号替换分号.我不确定Apache POI是否考虑到了这一点.
I don't believe that Apache POI supports formula names in names other than English. Try the English name. You may or may not need to replace the semicolons with commas; I'm not sure if Apache POI takes that into account.
cell.setCellFormula("IF(D87=0, \"\", D80/D87)");
这篇关于Apache poi setformula不适用于SE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!