推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
xiangphone
V2EX  ›  Python

请教一个 python 的模块, openpyxl 的问题

  •  
  •   xiangphone · Mar 10, 2015 · 4056 views
    This topic created in 4245 days ago, the information mentioned may be changed or developed.

    现在在用python的模块openpyxl在处理excel,获取指定的一个单元格,这个单元格是一个公式,所以取出来的值并不是我实际想要的值,而是一个公式,如:=N3*0.7
    请问有用过openpyxl的大神吗?这个如何解决呢?
    谢谢!

    2 replies  •  2015-03-20 15:36:28 +08:00
    cheerzeng
        1
    cheerzeng  
       Mar 11, 2015
    f = load_workbook('cli.xlsx',data_only=True)
    后面加个 data_only=True 就可以了。
    我也是查的,哈哈
    xiangphone
        2
    xiangphone  
    OP
       Mar 20, 2015
    是的,我也查到了,还是谢谢!

    wb2 = load_workbook(files[wb2_count],data_only = True)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2717 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:52 · PVG 10:52 · LAX 19:52 · JFK 22:52
    ♥ Do have faith in what you're doing.