我想用python在xlsx文件的列中插入list的值。
这是代码
def trasformazione (original):
inProj = Proj(init='epsg:4326')
outProj = Proj(init='epsg:3395')
transformat=[]
for g in range (0,row_count-1):
x2,y2 = transform(inProj,outProj,original[g][0],original[g][1])
transformat.append([x2,y2])
return (transformat)
transformat=trasformazione (original)
print(trasformazione (original))
# Create a workbook and add a worksheet.
workbook = xlsxwriter.Workbook('campioni1.xlsx')
worksheet = workbook.add_worksheet()
# Start from the first cell below the headers.
row = 1
col=0
# Iterate over the data and write it out row by row.
worksheet.write(row, col,transformat)
row += 1
workbook.close()
感谢您的支持