推荐学习书目
› 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 · 2795 views
    This topic created in 2378 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   ·   Privacy   ·   Solana   ·   2530 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 14:05 · PVG 22:05 · LAX 07:05 · JFK 10:05
    ♥ Do have faith in what you're doing.