有没有大神来帮忙看下问题出在哪里?

报错:'Document' object has no attribute 'add_paragragh'

from docx import Document

class Test(object):
    def __init__(self):
        self.doc = Document()

    def test(self):
        self.doc.add_paragragh('test')

if __name__ == '__main__':
    t = Test()
    t.test()

  

猜你喜欢

转载自www.cnblogs.com/watalo/p/12677048.html