2008年02月10日 星期日 15:47
´ó¼ÒºÃ£¬ ÎÒÏëÓÃxlrdÀ´¶ÁexcelÎļþ£¬¿ÉÊÇÓöµ½ÁËһЩÎÊÌ⣬ÇëÅ£ÈËÖ¸µãһϡ£Ð»Ð» #!/usr/bin/env python #coding=utf-8 import xlrd filefilter = open("fixationfilter1.txt",'a') data=xlrd.open_workbook("try.xls") sh=data.sheet_by_index(0) print >>filefilter,sh.cell_value(rowx=1,colx=1) filefilter.close() ´íÎ󱨸æΪ£º Traceback (most recent call last): File "D:/Program Files/python 2.4.3/py2exe code/tryxlrd.py", line 7, in -toplevel- data=xlrd.open_workbook("try.xls") File "D:\Program Files\python 2.4.3\Lib\site-packages\xlrd\__init__.py", line 370, in open_workbook biff_version = bk.getbof(XL_WORKBOOK_GLOBALS) File "D:\Program Files\python 2.4.3\Lib\site-packages\xlrd\__init__.py", line 1323, in getbof raise XLRDError('Expected BOF record; found 0x%04x' % opcode) XLRDError: Expected BOF record; found 0x4b50 -- Best Regards, He Jibo jibohe2在cyrus.psych.uiuc.edu hejibo在gmail.com --------------------------- He Jibo Department of Psychology, Beckman Institute for Advanced Science and Technology University of Illinois, Urbana Champaign, 603 East Daniel St., Champaign, IL 61820 Tel: 217-244-4461(office) 217-244-6763(lab) Email: hejibo在gmail.com -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20080210/738693ed/attachment.html
Zeuux © 2024
京ICP备05028076号