59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
import openpyxl
|
|
|
|
file_path = 'Kopie von Kostenrechnung der Nächsten jahre (3).xlsx'
|
|
wb = openpyxl.load_workbook(file_path, data_only=True)
|
|
sheet = wb['Tilgung bei Gleichbleibenden Be']
|
|
|
|
print('=== DETAIL-ANALYSE aller Spalten ===')
|
|
print('Format: Spalte | Header Zeile 1 | Header Zeile 2')
|
|
print('-' * 60)
|
|
|
|
for col in range(1, 35):
|
|
h1 = sheet.cell(1, col).value
|
|
h2 = sheet.cell(2, col).value
|
|
v = sheet.cell(189, col).value # April 2026
|
|
|
|
if h1 is not None or h2 is not None or v is not None:
|
|
print(f'{col:2d} | {str(h1):20s} | {str(h2):15s} | April 2026: {v}')
|
|
|
|
print('\n=== WELCHES SIND KREDITE? ===')
|
|
print('Kriterium: Hat Restschuld + Rate oder ist eindeutig benannt')
|
|
|
|
# Analyse der Gesamt-Spalte (24)
|
|
print('\nGesamt-Spalte (24) prüfen:')
|
|
for row in range(187, 192):
|
|
date = sheet.cell(row, 1).value
|
|
gesamt = sheet.cell(row, 24).value
|
|
print(f'Row {row} ({date}): {gesamt}')
|
|
|
|
# Mathematische Prüfung
|
|
print('\n=== MATHEMATISCHE PRÜFUNG April 2026 (Row 189) ===')
|
|
dsl = sheet.cell(189, 9).value or 0
|
|
psd = sheet.cell(189, 13).value or 0
|
|
zingel20 = sheet.cell(189, 20).value or 0
|
|
sparkasse28 = sheet.cell(189, 28).value or 0
|
|
|
|
print(f'DSL Bank (Col 9): {dsl}')
|
|
print(f'PSD Nord (Col 13): {psd}')
|
|
print(f'Zingelstr.14 (Col 20): {zingel20}')
|
|
print(f'Unbekannt (Col 28): {sparkasse28}')
|
|
print(f'Summe: {dsl + psd + zingel20 + sparkasse28}')
|
|
print(f'Gesamt (Col 24): {sheet.cell(189, 24).value}')
|
|
|
|
print('\n=== IST SPALTE 28 SPARKASSE RESTSCHULD? ===')
|
|
# Spalte 21 = Sparkasse RATE
|
|
# Spalte 28 könnte Sparkasse Restschuld sein
|
|
# Prüfe: Rate 350, Zinsen sinken wie bei Zingelstr.14
|
|
|
|
for row in range(189, 191):
|
|
date = sheet.cell(row, 1).value
|
|
rate21 = sheet.cell(row, 21).value
|
|
rest28 = sheet.cell(row, 28).value
|
|
zins30 = sheet.cell(row, 30).value
|
|
zins22 = sheet.cell(row, 22).value
|
|
print(f'{date}:')
|
|
print(f' Spalte 21 (Sparkasse Rate): {rate21}')
|
|
print(f' Spalte 22 (Sparkasse Zins): {zins22}')
|
|
print(f' Spalte 28 (Restschuld?): {rest28}')
|
|
print(f' Spalte 30 (Zinsen?): {zins30}')
|