modules/cij/xlsx.py
def gen_config_sheet(self, sheetname, plist):
        """ generate configuration"""
        worksheet_cfg = self.workbook.add_worksheet(sheetname)
        cell_format = self.workbook.add_format({'bold': False, 'font_name': u'等线'})
        cell_format_title = self.workbook.add_format({'border': 0, 'align': 'center',
                                                      'bg_color': '#c5d9f1', 'font_size': 12,
                                                      'font_name': u'等线', 'bold': False})
        worksheet_cfg.set_column('A:E', 40, cell_format)
        worksheet_cfg.write_row('A1', plist[0], cell_format_title)
        for i in range(1, len(plist)):
            worksheet_cfg.write_row('A%d' % (i+1), plist[i], cell_format)
def gen_config_sheet(self, sheetname, plist):
        """ generate configuration"""
        worksheet_cfg = self.workbook.add_worksheet(sheetname)
        cell_format = self.workbook.add_format({'bold': False, 'font_name': u'等线'})
        cell_format_title = self.workbook.add_format({'border': 0, 'align': 'center',
                                                      'bg_color': '#c5d9f1', 'font_size': 12,
                                                      'font_name': u'等线', 'bold': False})
        worksheet_cfg.set_column('A:E', 40, cell_format)
        worksheet_cfg.write_row('A1', plist[0], cell_format_title)
        for i in range(1, len(plist)):
            worksheet_cfg.write_row('A%d' % (i+1), plist[i], cell_format)
def gen_config_sheet ( self , sheetname , plist ) : worksheet_cfg = self . workbook . add_worksheet ( sheetname ) cell_format = self . workbook . add_format ( { 'bold' : False , 'font_name' : u'等线'})
 cell_format_title = self . workbook . add_format ( { 'border' : 0 , 'align' : 'center' , 'bg_color' : '#c5d9f1' , 'font_size' : 12 , 'font_name' : u'等线', 'b o d': Fa l e})
 worksheet_cfg . set_column ( 'A:E' , 40 , cell_format ) worksheet_cfg . write_row ( 'A1' , plist [ 0 ] , cell_format_title ) for i in range ( 1 , len ( plist ) ) : worksheet_cfg . write_row ( 'A%d' % ( i + 1 ) , plist [ i ] , cell_format )
generate configuration
generate configuration