[![Build Status](https://travis-ci.org/python-excel/xlrd.svg?branch=master)](https://travis-ci.org/python-excel/xlrd)
[![Coverage Status](https://coveralls.io/repos/github/python-excel/xlrd/badge.svg?branch=master)](https://coveralls.io/github/python-excel/xlrd?branch=master)
[![Documentation Status](https://readthedocs.org/projects/xlrd/badge/?version=latest)](http://xlrd.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/xlrd.svg)](https://badge.fury.io/py/xlrd)
### xlrd
Please read this before using this library: https://groups.google.com/d/msg/python-excel/P6TjJgFVjMI/g8d0eWxTBQAJ
**Purpose**: Provide a library for developers to use to extract data from Microsoft Excel (tm) spreadsheet files. It is not an end-user tool.
**Author**: John Machin, Lingfo Pty Ltd (sjmachin@lexicon.net)
**Licence**: BSD-style (see licences.py)
**Versions of Python supported**: 2.7, 3.4+.
**External modules required**:
The package itself is pure Python with no dependencies on modules or packages outside the standard Python distribution.
**Outside the current scope**: xlrd will safely and reliably ignore any of these if present in the file:
* Charts, Macros, Pictures, any other embedded object. WARNING: currently this includes embedded worksheets.
* VBA modules
* Formulas (results of formula calculations are extracted, of course).
* Comments
* Hyperlinks
* Autofilters, advanced filters, pivot tables, conditional formatting, data validation
**Unlikely to be done**:
* Handling password-protected (encrypted) files.
**Particular emphasis (refer docs for details)**:
* Operability across OS, regions, platforms
* Handling Excel's date problems, including the Windows / Macintosh four-year differential.
* Providing access to named constants and named groups of cells (from version 0.6.0)
* Providing access to "visual" information: font, "number format", background, border, alignment and protection for cells, height/width etc for rows/columns (from version 0.6.1)
**Quick start**:
```python
import xlrd
book = xlrd.open_workbook("myfile.xls")
print("The number of worksheets is {0}".format(book.nsheets))
print("Worksheet name(s): {0}".format(book.sheet_names()))
sh = book.sheet_by_index(0)
print("{0} {1} {2}".format(sh.name, sh.nrows, sh.ncols))
print("Cell D30 is {0}".format(sh.cell_value(rowx=29, colx=3)))
for rx in range(sh.nrows):
print(sh.row(rx))
```
**Another quick start**: This will show the first, second and last rows of each sheet in each file:
python PYDIR/scripts/runxlrd.py 3rows *blah*.xls
**Installation**:
* On Windows: use the installer.
* Any OS: Unzip the .zip file into a suitable directory, chdir to that directory, then do "python setup.py install".
* If PYDIR is your Python installation directory: the main files are in PYDIR/Lib/site-packages/xlrd the docs are in the doc subdirectory, and there's a sample script: PYDIR/Scripts/runxlrd.py
* If os.sep != "/": make the appropriate adjustments.
**Acknowledgements**:
* This package started life as a translation from C into Python of parts of a utility called "xlreader" developed by David Giffin. "This product includes software developed by David Giffin <david@giffin.org>."
* OpenOffice.org has truly excellent documentation of the Microsoft Excel file formats and Compound Document file format, authored by Daniel Rentz. See http://sc.openoffice.org
* U+5F20 U+654F: over a decade of inspiration, support, and interesting decoding opportunities.
* Ksenia Marasanova: sample Macintosh and non-Latin1 files, alpha testing
* Backporting to Python 2.1 was partially funded by Journyx - provider of timesheet and project accounting solutions (http://journyx.com/).
* Provision of formatting information in version 0.6.1 was funded by Simplistix Ltd (http://www.simplistix.co.uk/)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
xlrd-1.2.0.tar.gz (88个子文件)
xlrd-1.2.0
MANIFEST.in 72B
PKG-INFO 1KB
docs
api.rst 881B
licenses.rst 50B
conf.py 748B
unicode.rst 1KB
dates.rst 4KB
make.bat 5KB
installation.rst 472B
acknowledgements.rst 859B
changes.rst 18KB
development.rst 2KB
formatting.rst 4KB
vulnerabilities.rst 2KB
Makefile 5KB
index.rst 723B
references.rst 2KB
on_demand.rst 2KB
xlrd
xlsx.py 33KB
formula.py 92KB
formatting.py 44KB
sheet.py 104KB
compdoc.py 20KB
book.py 56KB
timemachine.py 2KB
__init__.py 6KB
info.py 36B
biffh.py 16KB
xldate.py 8KB
tests
test_cell.py 3KB
profiles.xls 33KB
issue20.xls 6KB
issue150.xlsx 97KB
self_evaluation_report_2014-05-19.xlsx 7KB
test_xldate_to_datetime.py 6KB
test_comments_excel_sheet2.xlsx 31KB
test_comments_gdocs.xlsx 4KB
test_open_workbook.py 2KB
reveng1.xlsx 16KB
__pycache__
test_xlsx_comments.cpython-35.pyc 3KB
test_sheet.cpython-35.pyc 7KB
test_formulas.cpython-35.pyc 4KB
test_xlsx_parse.cpython-35.pyc 2KB
test_biffh.cpython-35.pyc 899B
test_xldate.cpython-35.pyc 3KB
test_missing_records.cpython-35.pyc 1KB
test_workbook.cpython-35.pyc 2KB
test_formats.cpython-35.pyc 4KB
__init__.cpython-35.pyc 137B
test_xldate_to_datetime.cpython-35.pyc 4KB
base.cpython-35.pyc 347B
test_open_workbook.cpython-35.pyc 2KB
test_cell.cpython-35.pyc 3KB
test_biffh.py 575B
formula_test_sjmachin.xls 17KB
test_xldate.py 2KB
apachepoi_49609.xlsx 103KB
test_xlsx_comments.py 2KB
formula_test_names.xls 8KB
Formate.xls 11KB
text_bar.xlsx 8KB
test_formats.py 3KB
test_missing_records.py 659B
ragged.xls 7KB
picture_in_cell.xls 7KB
test_workbook.py 1KB
__init__.py 0B
biff4_no_format_no_window2.xls 3KB
apachepoi_52348.xlsx 5KB
test_comments_excel.xlsx 15KB
err_cell_empty.xlsx 125KB
xf_class.xls 23KB
test_sheet.py 5KB
test_formulas.py 2KB
base.py 119B
test_xlsx_parse.py 3KB
merged_cells.xlsx 9KB
LICENSE 4KB
setup.cfg 466B
examples
namesdemo.xls 22KB
xlrdnameAPIdemo.py 7KB
setup.py 2KB
xlrd.egg-info
PKG-INFO 1KB
SOURCES.txt 2KB
top_level.txt 5B
dependency_links.txt 1B
README.md 4KB
scripts
runxlrd.py 16KB
共 88 条
- 1
资源评论
- 吉利吉利2023-07-28这个文件能够稳定地读取大型excel文件,处理起来毫无压力,提高了工作效率。
- 月小烟2023-07-28这个xlrd-1.2.0.tar.gz文件非常实用,能够帮助处理excel文件的读取和操作,非常方便。
- 精准小天使2023-07-28使用xlrd-1.2.0.tar.gz文件,数据的导入和导出变得十分简单,减少了工作的繁琐程度。
- 王元祺2023-07-28在使用xlrd-1.2.0.tar.gz文件的过程中,发现它非常稳定,不会出现意外的崩溃或错误,值得信赖。
- 永远的122023-07-28xlrd-1.2.0.tar.gz文件的文档和示例丰富,很容易上手,不需要过多的学习成本。
maotou20
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功