如何利用VB程序从EXCEL表中查找特定的字符串

2024-12-14 18:25:56
推荐回答(1个)
回答1:

把 Excel 表当作数据库来检索:

set rs = cn.execute "SELECT * FROM Sheet1 IN ""C:\test\test1.xls"" ""EXCEL 5.0;"" WHERE ID_No ='100020198201052012'"

if not rs.EOF then msgbox rs!ID_No