Skip to content

Commit 70b8c62

Browse files
authored
Update excel-tools.py
1 parent bc9b5a9 commit 70b8c62

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

excel_tools/excel-tools.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222

2323
print("if you want the entire excel file displayed type OUTX")
2424
if input() == "OUTX":
25-
row = sheet_obj.max_row
26-
column = sheet_obj.max_column
27-
for i in range(1, row + 1):
28-
for j in range(1, column + 1):
29-
cell_obj = sheet_obj.cell(row=i, column=j)
30-
print(cell_obj.value)
25+
row = sheet_obj.max_row
26+
column = sheet_obj.max_column
27+
for i in range(1, row + 1):
28+
for j in range(1, column + 1):
29+
cell_obj = sheet_obj.cell(row=i, column=j)
30+
print(cell_obj.value)
3131
print("if you want to create a new excel file, print NEW")
3232
if input() == "NEW":
3333
print("enter your workbook name eg name.xlsx")
@@ -73,13 +73,13 @@
7373
if input() == "CHART":
7474
from openpyxl.chart import BarChart3D, Reference
7575
print("how many columns do you want")
76-
l = int(input())
77-
print("enter", l, " values")
78-
for i in range(l):
76+
lel = int(input())
77+
print("enter", lel, " values")
78+
for i in range(lel):
7979
b = int(input())
8080
sheet.append([b])
8181
values = Reference(sheet, min_col=1, min_row=1,
82-
max_col=1, max_row=l)
82+
max_col=1, max_row=lel)
8383
chart = BarChart3D()
8484
chart.add_data(values)
8585
print("enter chart title")

0 commit comments

Comments
 (0)