Here is an example of how you can do this:
import xlwt style = xlwt.easyxf('align: rotation 90') workbook = xlwt.Workbook() worksheet = workbook.add_sheet('Test') worksheet.write(0, 0, label='Formatted value', style=style) workbook.save('test.xls')
You can use the keyword rota or rotation .
FYI, the function under the hood is called here.
Hope this helps.
source share