Initial commit - Stand 26.04.2026
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import openpyxl, os
|
||||
|
||||
fp = r'C:\Users\renet\.openclaw\workspace\buchhaltungs-app'
|
||||
# Find Nebenkosten file
|
||||
for f in os.listdir(fp):
|
||||
if f.endswith('.xlsx') and 'ebenko' in f.lower():
|
||||
full = os.path.join(fp, f)
|
||||
print(f'Reading: {f}')
|
||||
wb = openpyxl.load_workbook(full, data_only=True, read_only=True)
|
||||
print(f'Sheets: {wb.sheetnames}')
|
||||
for sn in wb.sheetnames[:3]: # max 3 sheets
|
||||
ws = wb[sn]
|
||||
print(f'\n Sheet "{sn}":')
|
||||
count = 0
|
||||
for row in ws.iter_rows(max_row=40, values_only=True):
|
||||
vals = [v for v in row if v is not None]
|
||||
if vals:
|
||||
print(f' {vals}')
|
||||
count += 1
|
||||
if count == 0:
|
||||
print(' (empty)')
|
||||
wb.close()
|
||||
Reference in New Issue
Block a user