From 90e93dcfd8d432678c975826dfd2511edb4371fd Mon Sep 17 00:00:00 2001 From: anor Date: Thu, 26 Mar 2026 02:10:23 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20read=5Fxlsx=5Fxml=20MUST=20use=20max=5Fr?= =?UTF-8?q?ows=3D9999=20=E2=80=94=20=D0=B8=D1=82=D0=BE=D0=B3=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D0=BA=D0=BE=D0=BD=D1=86=D0=B5=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude генерировал read_xlsx_xml(path) без max_rows → default=50 строк → итоги на строке 168+ не видны → "Не найдены итоговые суммы". Добавлено IMPORTANT в промпт: ALWAYS pass max_rows=9999. Протестировано на сервере: 2/2 файла, 0 ошибок, значения корректны. Co-Authored-By: Claude Opus 4.6 (1M context) --- batch_v2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/batch_v2.py b/batch_v2.py index bae25c3..63143d4 100644 --- a/batch_v2.py +++ b/batch_v2.py @@ -241,6 +241,7 @@ The script must handle any file with the same general structure as the samples. - `target_file`: str — path to target xlsx (a copy, safe to modify) - `job`: dict — job["processed"] += 1 per file, job["errors"].append("msg") for errors - `read_xlsx_xml(path, max_rows=9999)`: dict[sheet_name, list[list[str]]] + IMPORTANT: ALWAYS pass max_rows=9999! Default is only 50 rows — totals are at the END of files! Column indices: A=0, B=1, C=2, ..., H=7, etc. Values are strings. - `openpyxl`: for writing to target xlsx - `Path`, `csv`, `json`, `re`, `os`