Skip to content
Snippets Groups Projects

new laura folder

Merged Laura Rævsbæk Birch requested to merge au620747-main-patch-86964 into main
1 file
+ 21
0
Compare changes
  • Side-by-side
  • Inline
+ 21
0
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
Loading