错误:用Openpyxl编写的公式中的508 [英] Err:508 in formula written with Openpyxl
本文介绍了错误:用Openpyxl编写的公式中的508的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个脚本:
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws['A1'] = 1 #any value
ws['B1'] = 0 #any value
ws['C1'] = 3 #any value
ws['D1'] = 0 #any value
ws['E1'] = "= IF(A1<>0;A1;1) * IF(B1<>0;B1;1) * IF(C1<>0;C1;1) * IF(D1<>0;D1;1)"
wb.save('error.xlsx')
当我使用LibreOffice Calc打开文件时,在E
列中看到 Err:508 :
When I open the file with LibreOffice Calc, I see Err:508 in E
column:
但是,如果我在命令行中编辑公式,而没有进行任何更改(即添加空格或删除任何字符并再次写相同的字符),则该公式有效.
However, if I edit the formula in the command line, without changing nothing (i.e. add an space or erase any character and write the same again) the formula works.
你知道哪里出了错吗?
推荐答案
查看全文