27 lines
720 B
Python
27 lines
720 B
Python
import openpyxl
|
|
import json
|
|
import os
|
|
|
|
os.chdir(r'C:\Users\renet\.openclaw\workspace\buchhaltungs-app')
|
|
|
|
# Excel-Datei laden
|
|
wb = openpyxl.load_workbook('Nebenkosten 2020.xlsx', data_only=True)
|
|
|
|
print(f"Sheets gefunden: {wb.sheetnames}")
|
|
print()
|
|
|
|
# Alle Sheets analysieren
|
|
for sheet_name in wb.sheetnames:
|
|
ws = wb[sheet_name]
|
|
print(f"\n=== {sheet_name} ===")
|
|
|
|
# Zeilen 1-25 für Header und Struktur
|
|
for row in range(1, 26):
|
|
values = []
|
|
for col in range(1, 15): # Spalten A-O
|
|
cell = ws.cell(row=row, column=col)
|
|
val = cell.value
|
|
values.append(str(val) if val is not None else "")
|
|
if any(values):
|
|
print(f"Zeile {row}: {values}")
|