def insert_part_fields_into_xlsx(part_fields_dict, filename, recurse, group_components):
'''Insert the fields in the extracted part dictionary into an XLSX spreadsheet.'''
logger.log(
DEBUG_OVERVIEW,
'Inserting extracted fields into XLSX file {}.'.format(filename))
# Either insert fields into an existing workbook, or use an empty one.
try:
wb = pyxl.load_workbook(filename, data_only=True)
except IOError:
wb = None
wb = insert_part_fields_into_wb(part_fields_dict, wb)
if group_components:
wb = group_wb(wb)
wb.save(filename)
评论列表
文章目录