2024-09-14 11:24:26 发布
网友
我想从excel访问有公式的单元格工作手册。实际上我的python脚本只能从excel读取数据,但我只需要有公式的单元格,并且只打印这些单元格 如果能举个例子,我将不胜感激。。。。。。。。。。在
有两件事可以帮助你解决问题:
HasForumla
HasFormula
e
cell
你可能想用
e = sheet.cell(row,17)
访问该位置的Cell对象。我不确定您的HasFormula属性来自何处,但是-在文档中找不到它。在
Cell
编辑: 我只是看了一下当前发行版的自述文件
xlrd will safely and reliably ignore any of these if present in the file:[...]Formulas (results of formula calculations are extracted, of course).[...]
xlrd will safely and reliably ignore any of these if present in the file:
xlrd
有两件事可以帮助你解决问题:
HasForumla
而不是HasFormula
e
是一个字符串,而不是cell
对象,因此{你可能想用
访问该位置的
Cell
对象。我不确定您的HasFormula
属性来自何处,但是-在文档中找不到它。在编辑: 我只是看了一下当前发行版的自述文件
相关问题 更多 >
编程相关推荐