使用Python在Excel中格式化单元格 [英] Formatting cells in Excel with Python

查看:50
本文介绍了使用Python在Excel中格式化单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用python在Excel中格式化单元格?

How do I format cells in Excel with python?

特别是我需要更改几个后续行的字体而不是粗体.

In particular I need to change the font of several subsequent rows to be regular instead of bold.

推荐答案

对于一般将Python用于Excel操作,我强烈建议您查看此网站.共有三个python模块,可让您执行所需的几乎所有工作: xlrd (阅读), xlwt (编写)和 xlutils (复制/修改/过滤器).在我提到的网站上,有很多相关的信息,包括文档和示例.特别地,您可能对此示例.祝你好运!

For using Python for Excel operations in general, I highly recommend checking out this site. There are three python modules that allow you to do pretty much anything you need: xlrd (reading), xlwt (writing), and xlutils (copy/modify/filter). On the site I mentioned, there is quite a bit of associated information including documentation and examples. In particular, you may be interested in this example. Good luck!

这篇关于使用Python在Excel中格式化单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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