You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
299 B
Python
17 lines
299 B
Python
2 years ago
|
import sys
|
||
|
import csv
|
||
|
import openpyxl
|
||
|
|
||
|
|
||
|
|
||
|
def Csv2Excel(*arg):
|
||
|
file_path = arg[0]
|
||
|
wb = openpyxl.Workbook()
|
||
|
ws = wb.active
|
||
|
with open(file_path) as f:
|
||
|
reader = csv.reader(f, delimiter='\t')
|
||
|
for row in reader:
|
||
|
ws.append(row)
|
||
|
|
||
|
wb.save(file_path + '.xlsx')
|