Skip to content

Commit 5ebb574

Browse files
committed
Fix 0014 0015 0016
1 parent a3ee5a2 commit 5ebb574

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Drake-Z/0014/0014.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def txt_to_xlsx(filename):
2121
file_cintent = json.load(file, encoding = 'UTF-8')
2222
print(file_cintent)
2323
workbook = Workbook()
24-
worksheet = workbook.create_sheet(title = 'student')
24+
worksheet = workbook.worksheets[0]
2525
for i in range(1, len(file_cintent)+1):
2626
worksheet.cell(row = i, column = 1).value = i
2727
for m in range(0, len(file_cintent[str(i)])):

Drake-Z/0015/0015.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def txt_to_xlsx(filename):
2121
file_cintent = json.load(file, encoding = 'UTF-8')
2222
print(file_cintent)
2323
workbook = Workbook()
24-
worksheet = workbook.create_sheet(title = 'city')
24+
worksheet = workbook.worksheets[0]
2525
for i in range(1, len(file_cintent)+1):
2626
worksheet.cell(row = i, column = 1).value = i
2727
worksheet.cell(row = i, column = 2).value = file_cintent[str(i)]

Drake-Z/0016/0016.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def txt_to_xlsx(filename):
2020
file_cintent = json.load(file, encoding = 'UTF-8')
2121
print(file_cintent)
2222
workbook = Workbook()
23-
worksheet = workbook.create_sheet(title = 'numbers')
23+
worksheet = workbook.worksheets[0]
2424
for i in range(1, len(file_cintent)+1):
2525
for m in range(1, len(file_cintent[i-1])+1):
2626
worksheet.cell(row = i, column = m).value = file_cintent[i-1][m-1]

0 commit comments

Comments
 (0)