用python编了小程序想改excel的单元格的内容。大部分excel文件都能操作,但是把代码考过来处理令一个文件就不行,提示如下:
Traceback (most recent call last):
File "D:\study\python\test\作业计划\zyjh6.py", line 18, in <module>
wb.save(r'D:\study\python\test\作业计划\周\BSC%s.xls' % i3)
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 643, in save
doc.save(filename, self.get_biff_data())
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 611, in get_biff_data
before += self.__all_fonts_num_formats_xf_styles_rec()
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 516, in __all_fonts_num_formats_xf_styles_rec
return self.__styles.get_biff_data()
File "C:\Python27\lib\site-packages\xlwt\Style.py", line 183, in get_biff_data
result += self._all_num_formats()
File "C:\Python27\lib\site-packages\xlwt\Style.py", line 208, in _all_num_formats
result += NumberFormatRecord(fmtidx, fmtstr).get()
File "C:\Python27\lib\site-packages\xlwt\BIFFRecords.py", line 791, in __init__
ufmtstr = upack2(fmtstr)
File "C:\Python27\lib\site-packages\xlwt\UnicodeUtils.py", line 50, in upack2
us = unicode(s, encoding)
TypeError: coercing to Unicode: need string or buffer, NoneType found
搞不懂啊