找回密码
 加入
搜索
查看: 3314|回复: 9

为什么无法查找到excel里的内容

[复制链接]
发表于 2009-2-7 19:40:52 | 显示全部楼层 |阅读模式
#include <Excel.au3>
#include <GUIConstantsEx.au3>
GUICreate("excel查找窗口",300,300)
$a=GUICtrlCreateButton("确认按钮",100,60,60,30)
$b=GUICtrlCreateInput("",70,30,150,20)
GUISetState(@SW_SHOW)
Func serach()
                $sFilePath1 = "E:\电信技术资料\1.xls"
                $oExcel = $sFilePath1
                for $i=0 to 20 step 1
                        if GUICtrlRead($b)=_excelreadarray($oExcel,$i,1,1) then
                                MsgBox(0,"确认输入",_excelreadarray($oExcel,1,1,1))
                                exitloop
                        Else
                                MsgBox(0,"无法找到","error")
                                exitloop
                        EndIf
                Next
endfunc
while 1
        $msg=GUIGetMsg()
        Select
                case $msg=$GUI_EVENT_CLOSE
                        exit
                case $msg=$a
                serach()
        EndSelect

        WEnd

[ 本帖最后由 bin0131 于 2009-2-9 16:13 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2009-2-7 23:35:57 | 显示全部楼层
自己顶一下
 楼主| 发表于 2009-2-8 18:06:31 | 显示全部楼层
怎么都没有人知道吗?
 楼主| 发表于 2009-2-8 21:18:37 | 显示全部楼层
_ExcelFindInRange()函数怎么用那,那位老大能提示一下那。
发表于 2009-2-8 22:54:45 | 显示全部楼层
把文件传上来看看呢
 楼主| 发表于 2009-2-9 09:01:00 | 显示全部楼层
已上传文件
发表于 2009-2-9 09:01:33 | 显示全部楼层
我都是用VBS改写读excel的 现在AU3对EXCEL的支持肯定要比微软自己差的多
不知道怎么用VBS可以联系或发信给我
 楼主| 发表于 2009-2-9 09:28:49 | 显示全部楼层
查找问题一解决,就是如何隐藏excel窗口还不是很清楚
发表于 2009-12-16 21:01:17 | 显示全部楼层
_ExcelFindInRange()在excel.au3中没找到,
_ExcelBookOpen($xlsfile_1,0) 第二个参数就是不显示excel窗口
发表于 2009-12-16 21:01:56 | 显示全部楼层
_ExcelFindInRange()
这在哪个文件里哦? 我现在也遇到这问题了~~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-2 05:54 , Processed in 0.088525 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表