Files
2026-04-26 07:51:39 +02:00

16 lines
690 B
Python

import openpyxl, os
base = r'C:\Users\renet\.openclaw\workspace\buchhaltungs-app'
for f in os.listdir(base):
if f.endswith('.xlsx') and 'osten' in f:
fp = os.path.join(base, f)
print(f'File: {f}')
wb = openpyxl.load_workbook(fp, data_only=True)
print(f'Sheets: {wb.sheetnames}')
for sn in wb.sheetnames:
ws = wb[sn]
print(f' Sheet "{sn}": {ws.max_row}r x {ws.max_column}c')
for row in ws.iter_rows(min_row=1, max_row=min(ws.max_row, 60), values_only=False):
vals = [(c.value, c.coordinate) for c in row if c.value is not None]
if vals:
print(f' {vals}')