python - xlsxwriter:有没有办法定义 "named cell"?

标签 python xlsxwriter

In excel您可以命名一个单元格或单元格区域。这个“命名单元格”在公式中特别有用。例如 =countif(EmployeeStatus, "Full Time")=countif($B$2:$B$102, "Full Time") 更具描述性。

此功能是否内置于 xlsxwriter 中?

谢谢。

最佳答案

不,我不相信它是。我没有在任何地方的文档中看到它。 https://xlsxwriter.readthedocs.org/working_with_cell_notation.html “Cell Utility Functions”不包括它。 为它提出一个功能请求可能会很好。

更新

他们张贴在 github这样做的方法。 (它使用工作簿,而不是单元格,所以我找错地方了。)

That is possible in XlsxWriter using the workbook define_name() method, see the docs and the example program.

文档中的例子是:

workbook.define_name('Sales', '=Sheet1!$G$1:$H$10')

关于python - xlsxwriter:有没有办法定义 "named cell"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26875123/

相关文章:

Python嵌套循环和更新集

python - 在线文件比较工具

python-3.x - 从 Python 中的 HTTP 触发的 azure 函数返回 excel 文件

python - 使用 xlsxwriter 或 xlwt 更改 python 2.7 中单元格的格式

python - 写入约 27k 行 38 列数据需要约 6 个多小时,这正常吗?

python - 如何使用 Pandas 在单元格中保存 *.xlsx 长 URL

python - 为什么在 "variable"中使用 self (引用?)?

python - 如何使用 Beautiful Soup 网页抓取获取帖子 ID?

python - 错误 : sqlite3. 操作错误 : no such table: main. m

python-3.x - XLSXWriter 使用动态单元格引用跨列应用公式