I see a couple examples of how to set the orientation of a text box, but not cell in a text box. I see how to format other things, like bold:
bold_format = workbook.add_format({'bold': True})
worksheet.write('A1', "something", bold_format)
but not vertically oriented text.
You can use set_rotation.
import xlsxwriter
workbook = xlsxwriter.Workbook("test.xlsx")
worksheet = workbook.add_worksheet()
worksheet.set_landscape()
bold_format = workbook.add_format({'bold': True})
bold_format.set_rotation(90)
worksheet.write('A1', "something", bold_format)
workbook.close()
For the entire documentation on set_rotation()
visit: https://xlsxwriter.readthedocs.io/format.html#format-set-rotation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With