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:

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
 

Python官方操作Excel文档的更多相关文章

  1. 用Python操作excel文档

    使用Python第三方库 这一节我们学习如何使用Python去操作Excel文档.如果大家有人不知道Excel的话,那么建议先学一学office办公基础.这里想要操作Excel,必须安装一个Pytho ...

  2. 使用Python操作Excel文档(一)

    Python | 使用Python操作Excel文档(一) 0 前言 在阅读本文之前,请确保您已满足或可能满足以下条件: 请确保您具备基本的Python编程能力. 请确保您会使用Excel. 请确保您 ...

  3. Python openpyxl : Excel 文档简单操作

    安装方法 使用 pip 或通过专门python IDE(如pyCharm)进行安装 其中pip安装方法,命令行输入:  pip install openpyxl 基本使用 第一步先是要导入 openp ...

  4. QTP操作excel文档

    对于QTP操作excel的大前提是,保证组建服务里的DCOM配置里存在 microsoft excel application ,具体的查看方式是,在运行框中输入dcomcnfg,然后会打开组件服务的 ...

  5. Python实现读取Excel文档中的配置并下载软件包

    问题:现在遇到这样一个问题,服务器存储了很多软件包,这些包输入不同的产品,每个产品都有自己的配置,互相交叉,那么到底某一产品所有配置的软件包下载后,占用多大空间呢? 分析:从这个问题入手,了解到:软件 ...

  6. 找到python官方标准库文档

    python中有很多标准库.我们没法记住全部标准库,但是可以在:https://docs.python.org/3/py-modindex.html 中查看标准库的索引 在python的官方文档中,如 ...

  7. python如何读写EXCEL文档 (有助于自动化的参数化,用的方法是XLRD,XLWT)

    读EXCEL: import xlrd 例1, data=xlrd.open("E:\egg.xls")     # 打开xls文件 table=data.sheets()[0] ...

  8. 1、关于python第三方工具操作xls和xlsx格式的excel文档选型的吐血经历

    首先,最近看了python的一本书,其中第7章是关于文章操作的,就计划把python操作excel,word,txt,xml,html,json等格式的文档做个总结,并实现一些功能,但是,第一步就要把 ...

  9. libreoffice python 操作word及excel文档

    1.开始.关闭libreoffice服务: 开始之前同步字体文件时间,是因为创建soffice服务时,服务会检查所需加载的文件的时间,如果其认为时间不符,则其可能会重新加载,耗时较长,因此需事先统一时 ...

随机推荐

  1. numpy meshgrid函数

    1.meshgrid函数用两个坐标轴上的点在平面上画格. 用法: [X,Y]=meshgrid(x,y)  [X,Y]=meshgrid(x)与[X,Y]=meshgrid(x,x)是等同的  [X, ...

  2. tomcat 查看和修改内存

    为了解决tomcat在大进行大并发请求时,出现内存溢出的问题,请修改tomcat的内存大小,其中分为以下两种方式: 一.使用 catalina.bat 等命令行方式运行的 tomcat 查看系统最大支 ...

  3. codeforces 777C

    C.Alyona and Spreadsheet During the lesson small girl Alyona works with one famous spreadsheet compu ...

  4. tensorflow_mmp

    搭建win10+py3.6+cuda9.1+cudnn7+tf1.5(如果想知道为什么这么搭配,自己去装两天就知道了) tensorflow_gpu......whl下载 剩下的官网下载,cuda9. ...

  5. 【 HDU 4936 】Rainbow Island (hash + 高斯消元)

    BUPT2017 wintertraining(15) #5B HDU - 4936 2014 Multi-University Training Contest 7 F 题意 直接看官方的题意和题解 ...

  6. 自学Python5.4-类 _init_方法

    自学Python之路 自学Python5.4-类  _init_方法 1. 定义一个类 定义一个类的格式如下:

  7. 一种BCD码转换的算法

    #include "stdio.h" typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef ...

  8. bzoj4336 骑士的旅行 (树链剖分+multiset)

    首先大概有一个树剖+树套树的做法,但我哪会写啊 然后发现k很小,如果用线段树记每个区间前k大的的话,可以O(k)地合并 而且一个点还有可能有好多个骑士,所以要用multiset维护一下 然后树剖就好啦 ...

  9. hdu3072 Intelligence System (最小树形图?)

    题意:给一个有向图,问要从0号点能到达所有点所需要经过路径的最小权值和是多少,然而,若两点强联通,则这两点互相到达不需要花费.保证0号点能到达所有点 tarjan缩点以后直接取每个点入边中花费最小的即 ...

  10. SpringCloud学习(二)---Eureka

    Eureka 重点在使用,概念和源码基本不涉及 Eureka是一个基于REST(REST是HTTP协议的)的服务,主要在亚马逊网络服务(AWS)云中使用,定位服务来进行中间层服务器的均衡负载和故障转移 ...