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
Opendesk-dxf-exporter.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录