展开全部
|
pyexcel-xls is a tiny wrapper library to read, manipulate and write data in xls format and it can read xlsx and xlsm fromat. You are likely to use it with pyexcel.
Known constraints
Fonts, colors and charts are not supported.
Installation
You can install it via pip:
$ pip install pyexcel-xls
or clone it and install it:
$ git clone hexcel-xls.git$ cd pyexcel-xls$ python setup.py install
Usage
As a standalone library
Write to an xls file
Here’s the sample code to write a dictionary to an xls file:
>>> from pyexcel_xls import save_data>>> data = OrderedDict() # from collections import OrderedDict>>> data.update({"Sheet 1": [[1, 2, 3], [4, 5, 6]]})>>> data.update({"Sheet 2": [["row 1", "row 2", "row 3"]]})>>> save_data("your_file.xls