Python官方操作Excel文档
xlwt 1.3.0
Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+
xlwt
This is a library for developers to use to generate spreadsheet files compatible with Microsoft Excel versions 95 to 2003.
The package itself is pure Python with no dependencies on modules or packages outside the standard Python distribution.
Please read this before using this package: https://groups.google.com/d/msg/python-excel/P6TjJgFVjMI/g8d0eWxTBQAJ
Installation
Do the following in your virtualenv:
pip install xlwt
Quick start
import xlwt
from datetime import datetime style0 = xlwt.easyxf('font: name Times New Roman, color-index red, bold on',
num_format_str='#,##0.00')
style1 = xlwt.easyxf(num_format_str='D-MMM-YY') wb = xlwt.Workbook()
ws = wb.add_sheet('A Test Sheet') ws.write(0, 0, 1234.56, style0)
ws.write(1, 0, datetime.now(), style1)
ws.write(2, 0, 1)
ws.write(2, 1, 1)
ws.write(2, 2, xlwt.Formula("A3+B3")) wb.save('example.xls')
Documentation
Documentation can be found in the docs directory of the xlwt package. If these aren’t sufficient, please consult the code in the examples directory and the source code itself.
The latest documentation can also be found at: https://xlwt.readthedocs.org/en/latest/
Problems?
Try the following in this order:
- Read the source
- Ask a question on https://groups.google.com/group/python-excel/
Acknowledgements
xlwt is a fork of the pyExcelerator package, which was developed by Roman V. Kiseliov. This product includes software developed by Roman V. Kiseliov <roman@kiseliov.ru>.
xlwt uses ANTLR v 2.7.7 to generate its formula compiler.
File | Type | Py Version | Uploaded on | Size | |
---|---|---|---|---|---|
xlwt-1.3.0-py2.py3-none-any.whl (md5) | Python Wheel | py2.py3 | 2017-08-22 | 97KB | |
xlwt-1.3.0.tar.gz (md5) | Source | 2017-08-22 | 150KB | ||
- Author: John Machin
- Home Page: http://www.python-excel.org/
- Download URL: https://pypi.python.org/pypi/xlwt
- Keywords: xls excel spreadsheet workbook worksheet pyExcelerator
- License: BSD
- Platform: Platform Independent
- Categories
- Development Status :: 5 - Production/Stable
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3
- Programming Language :: Python :: 3.3
- Programming Language :: Python :: 3.4
- Programming Language :: Python :: 3.5
- Programming Language :: Python :: 3.6
- Topic :: Database
- Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
- Topic :: Office/Business :: Financial :: Spreadsheet
- Topic :: Software Development :: Libraries :: Python Modules
- Package Index Owner: sjmachin, chrisw
- Package Index Maintainer: chrisw
- DOAP record: xlwt-1.3.0.xml
Python官方操作Excel文档的更多相关文章
- 用Python操作excel文档
使用Python第三方库 这一节我们学习如何使用Python去操作Excel文档.如果大家有人不知道Excel的话,那么建议先学一学office办公基础.这里想要操作Excel,必须安装一个Pytho ...
- 使用Python操作Excel文档(一)
Python | 使用Python操作Excel文档(一) 0 前言 在阅读本文之前,请确保您已满足或可能满足以下条件: 请确保您具备基本的Python编程能力. 请确保您会使用Excel. 请确保您 ...
- Python openpyxl : Excel 文档简单操作
安装方法 使用 pip 或通过专门python IDE(如pyCharm)进行安装 其中pip安装方法,命令行输入: pip install openpyxl 基本使用 第一步先是要导入 openp ...
- QTP操作excel文档
对于QTP操作excel的大前提是,保证组建服务里的DCOM配置里存在 microsoft excel application ,具体的查看方式是,在运行框中输入dcomcnfg,然后会打开组件服务的 ...
- Python实现读取Excel文档中的配置并下载软件包
问题:现在遇到这样一个问题,服务器存储了很多软件包,这些包输入不同的产品,每个产品都有自己的配置,互相交叉,那么到底某一产品所有配置的软件包下载后,占用多大空间呢? 分析:从这个问题入手,了解到:软件 ...
- 找到python官方标准库文档
python中有很多标准库.我们没法记住全部标准库,但是可以在:https://docs.python.org/3/py-modindex.html 中查看标准库的索引 在python的官方文档中,如 ...
- python如何读写EXCEL文档 (有助于自动化的参数化,用的方法是XLRD,XLWT)
读EXCEL: import xlrd 例1, data=xlrd.open("E:\egg.xls") # 打开xls文件 table=data.sheets()[0] ...
- 1、关于python第三方工具操作xls和xlsx格式的excel文档选型的吐血经历
首先,最近看了python的一本书,其中第7章是关于文章操作的,就计划把python操作excel,word,txt,xml,html,json等格式的文档做个总结,并实现一些功能,但是,第一步就要把 ...
- libreoffice python 操作word及excel文档
1.开始.关闭libreoffice服务: 开始之前同步字体文件时间,是因为创建soffice服务时,服务会检查所需加载的文件的时间,如果其认为时间不符,则其可能会重新加载,耗时较长,因此需事先统一时 ...
随机推荐
- ViewDragHelper
参考:Android 之 ViewDragHelper 详解 Android 之 ViewDragHelper详解(二) 看了几篇博客,并参考了上面的两篇博客,整理一下ViewDragHelper ...
- laravel 在nginx服务器上除了首页其余都是404的问题
nginx对应站点的.conf配置文件添加如下代码 location / { try_files $uri $uri/ /index.php$is_args$query_string; #语法: tr ...
- mysql 数据表备份导出,恢复导入操作实践
因为经常跑脚本的关系, 每次跑完数据之后,相关的测试服数据库表的数据都被跑乱了,重新跑脚本恢复回来速度也不快,所以尝试在跑脚本之前直接备份该表,然后跑完数据之后恢复的方式,应该会方便一点.所以实践一波 ...
- C# PictureBox控件畫圖
PictureBox的正方向: BitMap初始化: Bitmap bt = new Bitmap(Width,Height); Graphics gdi = Graphics.FromIm ...
- Java基础总结(一)
1:程序执行是有顺序的,如果没有流程控制语句,执行顺序是从上到下, 2:对象没有引用指向他的时候,jvm虚拟机就会在合适的时候去清理内存垃圾 3:对象的引用就相当于方向盘,操作对象 4:java8大基 ...
- flask再学习-思考之怎么从数据库中查询数据在页面展示!
看别人视频觉得很简单,要自己做蒙蔽了!这样子.NO! 1. 流程: 首先要有和数据库连接的驱动!一般有PYMySQL mysqlclient 等 使用扩展Flask-SQLAlchemy 获得orm对 ...
- Luogu5155 USACO18DEC Balance Beam(概率期望+凸包)
假设已经求出了在每个点的最优期望收益,显然最优策略是仅当移动一次后的期望收益>当前点收益时移动.对于初始点,其两边各存在一个最近的不满足上述条件的位置,因此从初始点开始随机游走,直到移动到这两个 ...
- Java原子类实现原理分析
在谈谈java中的volatile一文中,我们提到过并发包中的原子类可以解决类似num++这样的复合类操作的原子性问题,相比锁机制,使用原子类更精巧轻量,性能开销更小,本章就一起来分析下原子类的实现机 ...
- Spring的 AOP底层用到两种代理机制
JDK 的动态代理:针对实现了接口的类产生代理.CGlib 的动态代理:针对没有实现接口的类产生代理,应用的是底层的字节码增强的技术 生成当前类的子类对象 JDK动态代理实现1. 创建接口和对应实现类 ...
- 洛谷P2900 [USACO08MAR]土地征用Land Acquisition(动态规划,斜率优化,决策单调性,线性规划,单调队列)
洛谷题目传送门 用两种不一样的思路立体地理解斜率优化,你值得拥有. 题意分析 既然所有的土地都要买,那么我们可以考虑到,如果一块土地的宽和高(其实是蒟蒻把长方形立在了平面上)都比另一块要小,那么肯定是 ...