import openpyxl
import os

base_dir = os.path.dirname(os.path.abspath(__file__))

# Check Sectors file
sectors_file = os.path.join(base_dir, 'Prefered sectors for skilled labours.xlsx')
print("="*60)
print("SECTORS FILE:")
print("="*60)
wb = openpyxl.load_workbook(sectors_file)
ws = wb.active
print(f"Sheet name: {ws.title}")
print(f"Max row: {ws.max_row}, Max column: {ws.max_column}")
print("\nFirst 10 rows:")
for i, row in enumerate(ws.iter_rows(min_row=1, max_row=10, values_only=True), 1):
    print(f"Row {i}: {row}")

# Check Categories file
categories_file = os.path.join(base_dir, 'Preferred Job Category for skilled Labour.xlsx')
print("\n" + "="*60)
print("JOB CATEGORIES FILE:")
print("="*60)
wb = openpyxl.load_workbook(categories_file)
ws = wb.active
print(f"Sheet name: {ws.title}")
print(f"Max row: {ws.max_row}, Max column: {ws.max_column}")
print("\nFirst 10 rows:")
for i, row in enumerate(ws.iter_rows(min_row=1, max_row=10, values_only=True), 1):
    print(f"Row {i}: {row}")
