セルのフォント設定

2014/12/21

Python2.7, XlsxWriter 0.6.4

# -*- coding: utf-8 -*-

import xlsxwriter


def main():

    workbook = xlsxwriter.Workbook("test.xlsx")
    worksheet = workbook.add_worksheet("test")

    cell_format = workbook.add_format()
    cell_format.set_font_name('Times New Roman')
    cell_format.set_font_size(30)
    cell_format.set_font_color('red')
    cell_format.set_bold()

    #cell_format.set_italic()
    #cell_set_underline()


    worksheet.write(0,0,14.3246,cell_format)

    workbook.close()


if __name__ == '__main__':
    main()

The Format Class
https://xlsxwriter.readthedocs.org/format.html