diff --git a/db_to_xlsx.py b/db_to_xlsx.py index e4855a6..4d9bc87 100644 --- a/db_to_xlsx.py +++ b/db_to_xlsx.py @@ -20,7 +20,7 @@ ws.title = "Sheet" # Увімкнення захисту листа з налаштуваннями -ws.protection.objects = False # Заборонити редагування об'єктів (наприклад, зображень) +ws.protection.objects = True # Блокування об'єктів ws.protection.scenarios = False ws.protection.formatCells = False ws.protection.formatColumns = False @@ -53,7 +53,7 @@ def add_to_file(product, row_num): ws.add_image(img, photo_coordinates) - # Блокування клітинки з назвою товару + # Блокування клітинки з назвою товару ws[photo_coordinates].protection = openpyxl.styles.Protection(locked=True) except requests.exceptions.HTTPError as http_err: diff --git a/requirements.txt b/requirements.txt index 5ebf193..5095c26 100644 Binary files a/requirements.txt and b/requirements.txt differ