#!/usr/bin/python3
# -*- coding: utf-8 -*-
import xlrd2
def search_excel(path,search_word):
data_excel=xlrd2.open_workbook(path)
for sh in data_excel.sheets():
for row in sh.get_rows():
for cell in row:
if search_word in str(cell.value):
print(f"Found '{search_word}' at 行:'{cell.row}' 列:'{cell.column}'")
search_excel('C:/Users/2023/题库.xlsx','分析函数')
Python之excel内容查找
最新推荐文章于 2024-07-02 00:50:11 发布