|
22 | 22 |
|
23 | 23 | print("if you want the entire excel file displayed type OUTX")
|
24 | 24 | 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) |
31 | 31 | print("if you want to create a new excel file, print NEW")
|
32 | 32 | if input() == "NEW":
|
33 | 33 | print("enter your workbook name eg name.xlsx")
|
|
73 | 73 | if input() == "CHART":
|
74 | 74 | from openpyxl.chart import BarChart3D, Reference
|
75 | 75 | 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): |
79 | 79 | b = int(input())
|
80 | 80 | sheet.append([b])
|
81 | 81 | values = Reference(sheet, min_col=1, min_row=1,
|
82 |
| - max_col=1, max_row=l) |
| 82 | + max_col=1, max_row=lel) |
83 | 83 | chart = BarChart3D()
|
84 | 84 | chart.add_data(values)
|
85 | 85 | print("enter chart title")
|
|
0 commit comments