import openpyxl wb = openpyxl.load_workbook("한국임업진흥원.xlsx") ws = wb.active for r in range(1, ws.max_row+1): vals = [ws.cell(r,c).value for c in range(2,12)] # B~K txt = " | ".join(str(v) if v is not None else "" for v in vals) if "목재" in txt or "tech_0" in txt: print(f"r{r}: {txt}")