使用XlsxWriter将文本框或文本框中的文本定向为垂直吗?

时间:2019-06-29 14:44:31

标签: python xlsxwriter

我找不到示例如何在文本框中设置文本的垂直方向

我找到了如何在单元格中旋转文本,但是我需要在文本框中旋转文本

文本框代码

text = 'Some text in a textbox'
options = {
'font': {'color': 'white'},
'align': {'vertical': 'middle',
           'horizontal': 'center',
          },
'gradient': {'colors': ['red', 'blue']},
}
worksheet.insert_textbox(row, col, text, options)

单元格中带有旋转文本的代码

cell_format = workbook.add_format()
cell_format.set_rotation(90)
worksheet.write(1, 1, 'This text is rotated')
worksheet.set_column(col, col, None, cell_format)

1 个答案:

答案 0 :(得分:1)

这不是当前可用的功能,但是如果您打开Feature Request on GitHub,我可以添加它。