在python xlwt右边到左边excel页面布局

如何使用xlwt设置工作表布局(从右到左)?

我正在使用xlwt写一个Excel工作表,但我的数据是正确的左侧,我想设置工作表布局从右到左(相同的Microsoft Excel的页面布局选项卡)

import xlwt wb = xlwt.Workbook() for shx in 0, 1: ws = wb.add_sheet("S%d" % shx) # Excel 2003: Tools > Options > International > View current sheet right-to-left # Excel 2007: Page Layout > Sheet Right-to-Left ws.cols_right_to_left = shx ws.write(0, 0, "qwerty") wb.save("colsR2L.xls")