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
另外建了几个QQ技术群:
2、全栈技术群:616945527
2、硬件嵌入式开发: 75764412
3、Go语言交流群:9924600
闲置域名WWW.EXAI.CN (超级人工智能)出售。