Skip to content
Snippets Groups Projects
Commit 9b3d9f20 authored by Laura Rævsbæk Birch's avatar Laura Rævsbæk Birch
Browse files

Upload New File

parent 8e0cc6b0
No related branches found
No related tags found
1 merge request!1new laura folder
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
import xlrd
import csv
def create_participants_excel_tsv(path, excelFilePath):
workbook = xlrd.open_workbook(excelFilePath)
sheet = workbook.sheet_by_index(0)
parti = []
i = 0
with open(path, 'wt') as out_file:
tsv_writer = csv.writer(out_file, delimiter='\t')
for row in range(0, sheet.nrows):
for cell in sheet.row_values(i):
if (type(cell) is float):
cell = int(cell)
parti.append(cell)
tsv_writer.writerow(parti)
parti.clear()
i = i + 1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment