import openpyxl, re
from openpyxl.formula import Tokenizer
from pathlib import Path
p=Path('/Users/neo/.hermes/audits/cashflow-asset-hook-20260512-083049/wanchuan_anhui_v9_v2_1_long_asset_R29_R169_asset_schedule_atomic_SAFE_20260513-092323.xlsx')
wb=openpyxl.load_workbook(p,data_only=False)
ws=wb['长期资产循环_全量穿透校验']
errs=[]
for row in ws.iter_rows(min_row=64,max_row=180,min_col=3,max_col=14):
    for cell in row:
        v=cell.value
        if isinstance(v,str) and v.startswith('='):
            try:
                toks=Tokenizer(v).items
            except Exception as e:
                errs.append((cell.coordinate,v,repr(e)))
print('tokenizer errors',len(errs))
for e in errs[:50]: print(e)
