Opendesk-dxf-exporter.py 文件源码

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

项目:fusion360-dxf-export 作者: opendesk 项目源码 文件源码
def import_xlsx(file_loc):
  #file_loc = '/Users/harry/Dropbox (OpenDesk)/06_Production/06_Software/CADLine Plugin/excel files/LAYERCOLOURS - new.xlsx'
  wb = open_workbook(file_loc)

  sheet = wb.sheet_by_index(0)

  #row = sheet.row(4)

  sheetdict = {}
  for colnum in range(1, sheet.ncols):
    col_values_list = []
    for rownum in range(1, sheet.nrows):  
      #TO DO loop through each row and append in to a []
      col_values_list.append(eval(sheet.cell_value(rownum, colnum)))

    #print(col_values_list)
    sheetdict[sheet.cell_value(0, colnum)] = col_values_list
  #print(sheetdict.keys())
  #print(sheetdict)

  return sheetdict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号