V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
pidan
V2EX  ›  Python

求助:用 openpyxl 修改页脚 &[ 不显示

  •  
  •   pidan · Mar 31, 2020 · 2473 views
    This topic created in 2221 days ago, the information mentioned may be changed or developed.

    用的 ms office excel2019

    from openpyxl import Workbook, load_workbook
    wb = load_workbook('D:/Code/python/200330-SH3-A3-02R30.xlsx')
    ws = wb.active
    ws.oddFooter.right.text = "2020/03/31  &[时间]"
    wb.save("D:/Code/python/new200330-SH3-A3-02R30.xlsx")
    

    设置好后 &[ 不会直接显示,只会显示 时间] ,然后点自定义页脚,显示里边的内容没问题,然后点确定就正常了 alt 图片

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   931 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:32 · PVG 04:32 · LAX 13:32 · JFK 16:32
    ♥ Do have faith in what you're doing.