文件名称:pyexcelerator-0.6.4.1
介绍说明--下载内容均来自于网络,请自行研究使用
Excel文件读取
安装: python setup.py install
from pyExcelerator import *
sheets = parse_xls( d:/a.xls )
很简单,与 xlrd 不同。xlrd 需要先调用book = xlrd.open_workbook(filename)打开文档,然后再调用sh = book.sheet_by_index(i)来得到第几个sheet,然后再使用sh.cell_value(i, j)得到i行j列的单元格的值。操作多了一点。而上面的parse_xls(filename)则直接返回一个列表,每一项就是一个sheet的数据。每项是一个二元组(表名,单元格数据)。其中单元格数据为一个字典,键值就是单元格的索引(i,j)。如果某个单元格无数据,那么就不存在这个值。看似简单,但从处理上不象 xlrd 一样,可以知道每个sheet的最大行数和列数,然后进行循环。而使用 pyExcelerator 好象没有最大行数和列数,再加上空数据又不存在,因此在处理上相对麻烦一些。这样在处理上还需要注意。它与 xlrd 一样都支持 unicode ,但好象没有 xlrd 一样方便地判断单元格的类型的方法,感觉还是 xlrd 在功能上可能要强一些。当然这只是个人感觉,再加上只是看了看例子,并没有怎么使用。-Excel file read
安装: python setup.py install
from pyExcelerator import *
sheets = parse_xls( d:/a.xls )
很简单,与 xlrd 不同。xlrd 需要先调用book = xlrd.open_workbook(filename)打开文档,然后再调用sh = book.sheet_by_index(i)来得到第几个sheet,然后再使用sh.cell_value(i, j)得到i行j列的单元格的值。操作多了一点。而上面的parse_xls(filename)则直接返回一个列表,每一项就是一个sheet的数据。每项是一个二元组(表名,单元格数据)。其中单元格数据为一个字典,键值就是单元格的索引(i,j)。如果某个单元格无数据,那么就不存在这个值。看似简单,但从处理上不象 xlrd 一样,可以知道每个sheet的最大行数和列数,然后进行循环。而使用 pyExcelerator 好象没有最大行数和列数,再加上空数据又不存在,因此在处理上相对麻烦一些。这样在处理上还需要注意。它与 xlrd 一样都支持 unicode ,但好象没有 xlrd 一样方便地判断单元格的类型的方法,感觉还是 xlrd 在功能上可能要强一些。当然这只是个人感觉,再加上只是看了看例子,并没有怎么使用。-Excel file read
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pyexcelerator-0.6.4.1
.....................\hrc
.....................\...\py-2.4-hrc.py
.....................\...\python.hrc
.....................\pyExcelerator
.....................\.............\Utils.py
.....................\.............\ExcelFormulaLexer.py
.....................\.............\ImportXLS.py
.....................\.............\Style.py
.....................\.............\Cell.py
.....................\.............\Row.py
.....................\.............\Bitmap.py
.....................\.............\UnicodeUtils.py
.....................\.............\Column.py
.....................\.............\ExcelFormulaParser.py
.....................\.............\ExcelFormula.py
.....................\.............\Worksheet.py
.....................\.............\Deco.py
.....................\.............\__init__.py
.....................\.............\ExcelMagic.py
.....................\.............\antlr.py
.....................\.............\Formatting.py
.....................\.............\excel-formula.g
.....................\.............\Workbook.py
.....................\.............\CompoundDoc.py
.....................\.............\BIFFRecords.py
.....................\setup.py
.....................\CHANGES.txt
.....................\LICENSE.txt
.....................\tools
.....................\.....\xls2csv.py
.....................\.....\xls2html.py
.....................\.....\xls2txt.py
.....................\.....\Analyzer.py
.....................\.....\compdoc-dumper.py
.....................\.....\xls2csv-gerry.py
.....................\.....\biff-dumper.py
.....................\README.txt
.....................\THANKS.txt
.....................\PKG-INFO
.....................\TODO.txt
.....................\examples
.....................\........\xls2csv.py
.....................\........\mini.py
.....................\........\big-16Mb.py
.....................\........\protection.py
.....................\........\numbers.py
.....................\........\xls2html.py
.....................\........\wsprops.py
.....................\........\python.bmp
.....................\........\blanks.py
.....................\........\big-35Mb.py
.....................\........\merged.py
.....................\........\xls2txt.py
.....................\........\image.py
.....................\........\formula_names.py
.....................\........\sst.py
.....................\........\panes.py
.....................\........\unicode1.py
.....................\........\format.py
.....................\........\dates.py
.....................\........\hyperlinks.py
.....................\........\num_formats.py
.....................\........\merged0.py
.....................\........\unicode2.py
.....................\........\parse-fmla.py
.....................\........\outline.py
.....................\........\formulas.py
.....................\........\unicode0.py
.....................\........\row_styles.py
.....................\........\merged1.py
.....................\........\row_styles_empty.py
.....................\........\col_width.py
.....................\.cvsignore
.....................\museum
.....................\......\mini-mini.xls
.....................\......\P-0508-0000507647-3280-5298.xls
.....................\......\chart1v8.xls
.....................\......\frmla.xls
.....................\......\mini.xls
.....................\......\oo14.xls
.....................\......\excel2003.xls
.....................\......\macro2v8.xls
.....................\hrc
.....................\...\py-2.4-hrc.py
.....................\...\python.hrc
.....................\pyExcelerator
.....................\.............\Utils.py
.....................\.............\ExcelFormulaLexer.py
.....................\.............\ImportXLS.py
.....................\.............\Style.py
.....................\.............\Cell.py
.....................\.............\Row.py
.....................\.............\Bitmap.py
.....................\.............\UnicodeUtils.py
.....................\.............\Column.py
.....................\.............\ExcelFormulaParser.py
.....................\.............\ExcelFormula.py
.....................\.............\Worksheet.py
.....................\.............\Deco.py
.....................\.............\__init__.py
.....................\.............\ExcelMagic.py
.....................\.............\antlr.py
.....................\.............\Formatting.py
.....................\.............\excel-formula.g
.....................\.............\Workbook.py
.....................\.............\CompoundDoc.py
.....................\.............\BIFFRecords.py
.....................\setup.py
.....................\CHANGES.txt
.....................\LICENSE.txt
.....................\tools
.....................\.....\xls2csv.py
.....................\.....\xls2html.py
.....................\.....\xls2txt.py
.....................\.....\Analyzer.py
.....................\.....\compdoc-dumper.py
.....................\.....\xls2csv-gerry.py
.....................\.....\biff-dumper.py
.....................\README.txt
.....................\THANKS.txt
.....................\PKG-INFO
.....................\TODO.txt
.....................\examples
.....................\........\xls2csv.py
.....................\........\mini.py
.....................\........\big-16Mb.py
.....................\........\protection.py
.....................\........\numbers.py
.....................\........\xls2html.py
.....................\........\wsprops.py
.....................\........\python.bmp
.....................\........\blanks.py
.....................\........\big-35Mb.py
.....................\........\merged.py
.....................\........\xls2txt.py
.....................\........\image.py
.....................\........\formula_names.py
.....................\........\sst.py
.....................\........\panes.py
.....................\........\unicode1.py
.....................\........\format.py
.....................\........\dates.py
.....................\........\hyperlinks.py
.....................\........\num_formats.py
.....................\........\merged0.py
.....................\........\unicode2.py
.....................\........\parse-fmla.py
.....................\........\outline.py
.....................\........\formulas.py
.....................\........\unicode0.py
.....................\........\row_styles.py
.....................\........\merged1.py
.....................\........\row_styles_empty.py
.....................\........\col_width.py
.....................\.cvsignore
.....................\museum
.....................\......\mini-mini.xls
.....................\......\P-0508-0000507647-3280-5298.xls
.....................\......\chart1v8.xls
.....................\......\frmla.xls
.....................\......\mini.xls
.....................\......\oo14.xls
.....................\......\excel2003.xls
.....................\......\macro2v8.xls