Esempio n. 1
0
 def write_data(self, sheet: Worksheet, year_list):
     sheet.write_column(1, 0, asset_sheet_content_zh)
     col = 1
     for year in year_list:
         sheet.write(0, col, str(year) + self.date)
         sheet.write_column(1, col, self.get_sheet(year).data_list)
         col += 1
Esempio n. 2
0
 def write_data(self, sheet: Worksheet, merge_format):
     """
     write the indicator data to the indicator sheet
     :param sheet: indicator sheet which is a xlsxwriter.Worksheet instance
     """
     col = 1
     for year in self.year_list:
         year_data = self.year2data[year]
         sheet.write_column(6, col, year_data.data_list)
         col += 1
     avg_col = 1 + len(self.year_list)  # “行业平均”数据所在列
     ratio_col = 1 + avg_col  # “比率”数据所在列
     sub_score_col = 1 + ratio_col  # “分项能力”得分所在列
     sheet.write_column(6, avg_col, self.avg_data)
     sheet.write_column(6, ratio_col, self.ratio)
     sheet.merge_range("%s:%s" % (xl_rowcol_to_cell(6, sub_score_col), xl_rowcol_to_cell(11, sub_score_col)),
                       self.score, merge_format)