[英]How to write formula in xlsxwriter python
I have an excel that is being created with xlsxwriter in Python and I want to add another column that will be a formula that will divide two cells.我有一个 excel 正在使用 Python 中的 xlsxwriter 创建,我想添加另一列,该列将是一个将两个单元格分开的公式。 The picture below represents what I'm trying to do (Column K):下图代表了我正在尝试做的事情(K 列):
And I have the following line of code but I don't know what else to write:我有以下代码行,但我不知道还要写什么:
worksheet.write_formula(row+sigrowprecons,col+10,"")
try this尝试这个
worksheet.write_array_formula('K2:K100', '{=I2:I100/J2:J100}', cell_format, 15)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.