У меня есть код
import openpyxl
wb = openpyxl.load_workbook(filename='output.xlsx', read_only=False)
sheet = wb['Лист2']
u = sheet['A1'].value
i = 1
while u != None:
u = sheet[f'A{i}'].value
print(u)
print(u)
print(u)
if u == None:
break
i = i + 1
sheet[f'A{i}'].value = 'ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpWeUdQM3BCZkhIeWI@195.2.80.242:50569/?outline=1'
sheet[f'B{i}'].value = 'Амстердам'
sheet[f'С{i}'].value = '40GB'
sheet[f'D{i}'].value = '5464646'
sheet[f'E{i}'].value = '26-56-64'
sheet[f'F{i}'].value = '16:57:67'
sheet[f'G{i}'].value = '5654645656'
wb.save('output.xlsx')
и вот ошибка
Traceback (most recent call last):
File "c:\Users\Максим\Desktop\bot outline vpn 3500\qiwi.py", line 16, in <module>
sheet[f'С{i}'].value = '40GB'
File "C:\Users\Максим\AppData\Local\Programs\Python\Python310\lib\site-packages\openpyxl\worksheet\worksheet.py", line 290, in __getitem__
min_col, min_row, max_col, max_row = range_boundaries(key)
File "C:\Users\Максим\AppData\Local\Programs\Python\Python310\lib\site-packages\openpyxl\utils\cell.py", line 135, in range_boundaries
raise ValueError(msg)
ValueError: С2 is not a valid coordinate or range
PS C:\Users\Максим\Desktop\bot outline vpn 3500>