我正在计算delta并将其写入一个单元格。但是我需要在write方法的公式末尾加上%
我试过各种方法来添加那个字符,但都做不到
#Calculate Delta
worksheet1.write(configRow + 1, configCol + 3, "=((C{}-D{})/D{})".format(configRow + 2, configRow + 2, configRow + 2))
#Perform Conditional Formatting
worksheet1.conditional_format('E{}'.format(configRow + 2), {'type': 'cell',
'criteria': 'between',
'minimum': -3,
'maximum': 3,
'format': format_values5})
通过上面的代码,我可以将一个数字写入一个单元格,并根据特定的条件对其进行格式化。 例如:E23包含1.00056
我需要这样一个结果,结尾包含%: 1.00056%
我所做的是:
因此,cell\u formt01具有set\u num\u格式,在这里我定义了格式类型。因此,所有使用write()方法编写的值都将以cell\ formt01的方式格式化
相关问题 更多 >
编程相关推荐