kifield.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:KiField 作者: xesscorp 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号