如何使用 xlrd 读取公式 [英] how to read formulas with xlrd

查看:75
本文介绍了如何使用 xlrd 读取公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试做一个解析器,读取多个 excel 文件.我通常需要在一行的底部找到所有上层元素的总和的值.所以单元格值实际上是=sum()"或A5*0.5"让我们说......对于用excel打开这个文件的用户来说,它看起来像一个数字,这很好.但是,如果我尝试使用 ws.cell(x, y).value 读取此值,我将一无所获.

I am trying to do a parser, that reads several excel files. I need values usually at the bottom of a row where you find a sum of all upper elements. So the cell value is actually "=sum()" or "A5*0.5" lets say... To a user that opens this file with excel it appears like a number, which is fine. But if I try to read this value with ws.cell(x, y).value I do not get anything.

所以我的问题是如何使用 xlrd 读取此类字段,是否可以像 ws.cell(x, y).value 或类似的东西一样读取它?

So my question is how to read this kind of fields with xlrd, if it is possible to read it like ws.cell(x, y).value or something similar?

谢谢

推荐答案

根据你问题的链接,我已经在上面发布了,xlrd 的作者说,这项工作正在进行中",但不太可能一旦 xlrd 的焦点在别处,就可以立即使用".由此,我认为您对此无能为力.注意:这是基于作者在 2011 年 1 月的评论.

As per the link for your question,I have posted above, the author of xlrd says, 'The work is 'in-progress' but is not likely to be available soon as the focus of xlrd lies elsewhere". By this, I assume that there is nothing much you can do about it. Note: this is based on author's comment on Jan, 2011.

这篇关于如何使用 xlrd 读取公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆