使用python代码编程将“编号,位置,速度,加速度”数据写入到excel表格当中,其中位置是[x1,y1,x2,y2]格式,编写一个代码...

可以使用下面的Python代码来实现写入Excel表格:import xlwtworkbook = xlwt.Workbook() sheet = workbook.add_sheet("sheet1")# 写入编号 sheet.write(0, 0, "编号")

写入位置

sheet.write(0, 1, "位置")

写入速度

sheet.write(0, 2, "速度")

写入加速度

sheet.write(0, 3, "加速度")# 写入具体的数据 for i in range(len(num)): sheet.write(i+1, 0, num[i])

猜你喜欢

转载自blog.csdn.net/weixin_42611310/article/details/129566009