推荐学习书目
› 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
Loop680
V2EX  ›  Python

openpyxl 库安装之后出现的错误求助=、=

  •  
  •   Loop680 · Dec 24, 2014 · 6994 views
    This topic created in 4301 days ago, the information mentioned may be changed or developed.
    Traceback (most recent call last):
    File "C:\Python27\exercise\obj\ver 0.6.py", line 13, in <module>
    ws = wb.active
    AttributeError: 'Workbook' object has no attribute 'active'

    这可咋整……
    3 replies  •  2014-12-25 08:22:45 +08:00
    weyou
        1
    weyou  
       Dec 24, 2014
    前面的代码给全了先
    Loop680
        2
    Loop680  
    OP
       Dec 25, 2014
    @weyou
    >>> from openpyxl import Workbook
    >>> from openpyxl import load_workbook
    >>> wb = Workbook()
    >>> ws = wb.active

    Traceback (most recent call last):
    File "<pyshell#3>", line 1, in <module>
    ws = wb.active
    AttributeError: 'Workbook' object has no attribute 'active'
    Loop680
        3
    Loop680  
    OP
       Dec 25, 2014
    @weyou 我重装python之前,openpyxl库文件还是好好地,重装之后就变成这样了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2442 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:49 · PVG 21:49 · LAX 06:49 · JFK 09:49
    ♥ Do have faith in what you're doing.