m0_51965968
m0_51965968
2021-01-05 10:11
采纳率: 100%
浏览 20

python办公自动化 这是什么原因?求解答

Traceback (most recent call last):
  File "C:\Users\lenovo\Desktop\1.py", line 56, in <module>
    workbook.save(r"C:\Users\lenovo\Desktop\A\6666.xls")
  File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\xlwt\Workbook.py", line 710, in save
    doc.save(filename_or_stream, self.get_biff_data())
  File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\xlwt\Workbook.py", line 667, in get_biff_data
    before += self.__all_fonts_num_formats_xf_styles_rec()
  File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\xlwt\Workbook.py", line 570, in __all_fonts_num_formats_xf_styles_rec
    return self.__styles.get_biff_data()
  File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\xlwt\Style.py", line 184, in get_biff_data
    result += self._all_fonts()
  File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\xlwt\Style.py", line 197, in _all_fonts
    result += font.get_biff_record().get()
TypeError: get_biff_record() missing 1 required positional argument: 'self'

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • qq_42145283
    冰阔箩 2021-01-05 16:48
    已采纳

    get_biff_record(self)就可以了,缺少必要参数

    点赞 评论

相关推荐