Skip to content

Commit a617d05

Browse files
committed
use of json
1 parent 64ecc54 commit a617d05

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

write_excel_file.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
1-
import xlwt
2-
import openpyxl
1+
import xlwt # type: ignore
2+
import openpyxl # type: ignore
33

44
# Workbook is created
55
xlwt_wb = xlwt.Workbook()
66

7+
"""
8+
we can also use of json object format for this file or code,
9+
for the index we can use (for loop) and for data use json object.
10+
example of json object:
11+
{
12+
"data":[
13+
"ISBT DEHRADUN".
14+
"SHASTRADHARA",
15+
"CLEMEN TOWN",
16+
"RAJPUR ROAD",
17+
"CLOCK TOWER",
18+
"ISBT DEHRADUN",
19+
"SHASTRADHARA",
20+
"CLEMEN TOWN",
21+
"RAJPUR ROAD",
22+
"CLOCK TOWER"
23+
]
24+
}
25+
"""
26+
727
# add_sheet is used to create sheet.
828
sheet1 = xlwt_wb.add_sheet("Sheet 1")
929

0 commit comments

Comments
 (0)