Python-docx,我可以在table里面写符号吗?

Python-docx, can I write symbols inside table?

我可以使用 Python-docx 在 table 的单元格内写入符号吗?让我们说σ(西格玛)。到目前为止我得到了:

from docx import Document

document = Document()
table = document.add_table(rows=2, cols=2)
table.style = 'TableGrid' #single lines in all cells

heading_cells = table.rows[0].cells 
heading_cells[0].text = '\sigma'

document.save('test.docx')

实际上,它适用于:

heading_cells[0].text = 'σ'