3 Star 0 Fork 0

Gitee 极速下载 / xlrd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/python-excel/xlrd
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

xlrd

Build Status Coverage Status Documentation PyPI version

xlrd is a library for reading data and formatting information from Excel files in the historical .xls format.

Warning

This library will no longer read anything other than .xls files. For alternatives that read newer file formats, please see http://www.python-excel.org/.

The following are also not supported but will safely and reliably be ignored:

  • Charts, Macros, Pictures, any other embedded object, including embedded worksheets.
  • VBA modules
  • Formulas, but results of formula calculations are extracted.
  • Comments
  • Hyperlinks
  • Autofilters, advanced filters, pivot tables, conditional formatting, data validation

Password-protected files are not supported and cannot be read by this library.

Quick start:

pip install xlrd
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))

From the command line, this will show the first, second and last rows of each sheet in each file:

python PYDIR/scripts/runxlrd.py 3rows *blah*.xls

空文件

简介

This package is for reading data and formatting information from older Excel files (ie: .xls) 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/mirrors/xlrd.git
git@gitee.com:mirrors/xlrd.git
mirrors
xlrd
xlrd
master

搜索帮助