取单元格数据,按钮到剪贴板。怎样实现点刷新,重新从表格提取新数据?
#include <ButtonConstants.au3>#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiToolbar.au3>
#include <ToolbarConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <Excel.au3>
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <Clipboard.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=C:\Users\ltxpc\Desktop\C3辅助工具1.0.kxf
$Form1 = GUICreate("C3辅助", 243, 806, 1164, 9)
GUISetState(@SW_SHOW)
WinSetOnTop($Form1, "",$WINDOWS_ONTOP)
GUISetBkColor(0xC0DCC0)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
; 打开电子表格========================================================================
Local $oExcel = _Excel_Open()
If @error Then Exit MsgBox(16, "打开错误: 表格不存在!", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
Local $sWorkbook = @ScriptDir & "\农贷-抵押.et"
Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook)
If @error Then Exit MsgBox($MB_SYSTEMMODAL, "打开错误: 表格不存在!", "不能读取'" & $sWorkbook & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
MsgBox($MB_SYSTEMMODAL, "成功:", "已读取表格中的C3数据" & @CRLF & @CRLF & "Creation Date: " & $oWorkbook.BuiltinDocumentProperties("Creation Date").Value)
$Button1 = GUICtrlCreateButton("刷新数据", 144, 16, 84, 50)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000080)
;Dim $Form2_AccelTable = [["{F5}", $Button1]]
;GUISetAccelerators($Form2_AccelTable)
GUISetState(@SW_SHOW)
GUICtrlSetOnEvent(-1, "Button1Click")
$Button3 = GUICtrlCreateButton("借款人姓名", 8, 72, 110, 25)
GUICtrlSetOnEvent(-1, "Button3Click")
$Button4 = GUICtrlCreateButton("贷款金额", 120, 72, 110, 25)
GUICtrlSetOnEvent(-1, "Button4Click")
$Button5 = GUICtrlCreateButton("借款人电话", 8, 96, 110, 25)
GUICtrlSetOnEvent(-1, "Button5Click")
$Button6 = GUICtrlCreateButton("经营场所", 120, 96, 110, 25)
GUICtrlSetOnEvent(-1, "Button6Click")
$Button7 = GUICtrlCreateButton("现住址", 8, 120, 110, 25)
GUICtrlSetOnEvent(-1, "Button7Click")
$Button8 = GUICtrlCreateButton("惠农卡号", 120, 120, 110, 25)
GUICtrlSetOnEvent(-1, "Button8Click")
$Button9 = GUICtrlCreateButton("借款人身份证", 8, 144, 110, 25)
GUICtrlSetOnEvent(-1, "Button9Click")
$Button10 = GUICtrlCreateButton("家庭成员姓名", 120, 144, 110, 25)
GUICtrlSetOnEvent(-1, "Button10Click")
$Button11 = GUICtrlCreateButton("1房产价值", 8, 168, 110, 25)
GUICtrlSetOnEvent(-1, "Button11Click")
$Button12 = GUICtrlCreateButton("1产权人", 120, 168, 110, 25)
GUICtrlSetOnEvent(-1, "Button12Click")
$Button13 = GUICtrlCreateButton("1产权人身份证", 8, 192, 110, 25)
GUICtrlSetOnEvent(-1, "Button13Click")
$Button14 = GUICtrlCreateButton("1共有人", 120, 192, 110, 25)
GUICtrlSetOnEvent(-1, "Button14Click")
$Button15 = GUICtrlCreateButton("1共有人身份证", 8, 216, 110, 25)
GUICtrlSetOnEvent(-1, "Button15Click")
$Button16 = GUICtrlCreateButton("1座落位置", 120, 216, 110, 25)
GUICtrlSetOnEvent(-1, "Button16Click")
$Button17 = GUICtrlCreateButton("1房产证号", 8, 240, 110, 25)
GUICtrlSetOnEvent(-1, "Button17Click")
$Button18 = GUICtrlCreateButton("1产权人电话", 120, 240, 110, 25)
GUICtrlSetOnEvent(-1, "Button18Click")
$Button19 = GUICtrlCreateButton("经营年限", 8, 264, 110, 25)
GUICtrlSetOnEvent(-1, "Button19Click")
$Button20 = GUICtrlCreateButton("水稻亩数", 120, 264, 110, 25)
GUICtrlSetOnEvent(-1, "Button20Click")
$Button21 = GUICtrlCreateButton("农机、设备", 8, 288, 110, 25)
GUICtrlSetOnEvent(-1, "Button21Click")
$Button22 = GUICtrlCreateButton("生物资产", 120, 288, 110, 25)
GUICtrlSetOnEvent(-1, "Button22Click")
$Button23 = GUICtrlCreateButton("经营销售收入", 8, 312, 110, 25)
GUICtrlSetOnEvent(-1, "Button23Click")
$Button24 = GUICtrlCreateButton("经营成本、税费支出", 120, 312, 110, 25)
GUICtrlSetOnEvent(-1, "Button24Click")
$Button25 = GUICtrlCreateButton("其他收入", 8, 336, 110, 25)
GUICtrlSetOnEvent(-1, "Button25Click")
$Button26 = GUICtrlCreateButton("其他支出", 120, 336, 110, 25)
GUICtrlSetOnEvent(-1, "Button26Click")
$Button27 = GUICtrlCreateButton("经营利润", 8, 360, 110, 25)
GUICtrlSetOnEvent(-1, "Button27Click")
$Button28 = GUICtrlCreateButton("家庭年收入", 120, 360, 110, 25)
GUICtrlSetOnEvent(-1, "Button28Click")
$Button29 = GUICtrlCreateButton("客户个性描述", 8, 384, 110, 25)
GUICtrlSetOnEvent(-1, "Button29Click")
$Button30 = GUICtrlCreateButton("小额受理文字", 120, 384, 110, 25)
GUICtrlSetOnEvent(-1, "Button30Click")
$Button31 = GUICtrlCreateButton("大额受理文字", 8, 408, 110, 25)
GUICtrlSetOnEvent(-1, "Button31Click")
$Button32 = GUICtrlCreateButton("", 120, 408, 110, 25)
GUICtrlSetOnEvent(-1, "Button32Click")
$Button33 = GUICtrlCreateButton("", 8, 432, 110, 25)
GUICtrlSetOnEvent(-1, "Button33Click")
$Button34 = GUICtrlCreateButton("", 120, 432, 110, 25)
GUICtrlSetOnEvent(-1, "Button34Click")
$Button35 = GUICtrlCreateButton("2房产价值", 8, 456, 110, 25)
GUICtrlSetOnEvent(-1, "Button35Click")
$Button36 = GUICtrlCreateButton("2产权人", 120, 456, 110, 25)
GUICtrlSetOnEvent(-1, "Button36Click")
$Button37 = GUICtrlCreateButton("2产权人身份证", 8, 480, 110, 25)
GUICtrlSetOnEvent(-1, "Button37Click")
$Button38 = GUICtrlCreateButton("2共有人", 120, 480, 110, 25)
GUICtrlSetOnEvent(-1, "Button38Click")
$Button39 = GUICtrlCreateButton("2共有人身份证", 8, 504, 110, 25)
GUICtrlSetOnEvent(-1, "Button39Click")
$Button40 = GUICtrlCreateButton("2座落位置", 120, 504, 110, 25)
GUICtrlSetOnEvent(-1, "Button40Click")
$Button41 = GUICtrlCreateButton("2房产证号", 8, 528, 110, 25)
GUICtrlSetOnEvent(-1, "Button41Click")
$Button42 = GUICtrlCreateButton("2产权人电话", 120, 528, 110, 25)
GUICtrlSetOnEvent(-1, "Button42Click")
$Button43 = GUICtrlCreateButton("", 8, 552, 110, 25)
GUICtrlSetOnEvent(-1, "Button43Click")
$Button44 = GUICtrlCreateButton("", 120, 552, 110, 25)
GUICtrlSetOnEvent(-1, "Button44Click")
$Button45 = GUICtrlCreateButton("", 8, 576, 110, 25)
GUICtrlSetOnEvent(-1, "Button45Click")
$Button46 = GUICtrlCreateButton("", 120, 576, 110, 25)
GUICtrlSetOnEvent(-1, "Button46Click")
$Button47 = GUICtrlCreateButton("", 8, 600, 110, 25)
GUICtrlSetOnEvent(-1, "Button47Click")
$Button48 = GUICtrlCreateButton("", 120, 600, 110, 25)
GUICtrlSetOnEvent(-1, "Button48Click")
$Button49 = GUICtrlCreateButton("", 8, 624, 110, 25)
GUICtrlSetOnEvent(-1, "Button49Click")
$Button50 = GUICtrlCreateButton("", 120, 624, 110, 25)
GUICtrlSetOnEvent(-1, "Button50Click")
$Button51 = GUICtrlCreateButton("", 8, 648, 110, 25)
GUICtrlSetOnEvent(-1, "Button51Click")
$Button52 = GUICtrlCreateButton("", 120, 648, 110, 25)
GUICtrlSetOnEvent(-1, "Button52Click")
$Button53 = GUICtrlCreateButton("", 8, 672, 110, 25)
GUICtrlSetOnEvent(-1, "Button53Click")
$Button54 = GUICtrlCreateButton("", 120, 672, 110, 25)
GUICtrlSetOnEvent(-1, "Button54Click")
$Button55 = GUICtrlCreateButton("", 8, 696, 110, 25)
GUICtrlSetOnEvent(-1, "Button55Click")
$Button56 = GUICtrlCreateButton("", 120, 696, 110, 25)
GUICtrlSetOnEvent(-1, "Button56Click")
$Label1 = GUICtrlCreateLabel("版本:1.2016.12.26", 6, 36, 130, 17)
GUICtrlSetOnEvent(-1, "Label1Click")
GUISetState(@SW_SHOW)
;While 1
; $nMsg1 = GUIGetMsg()
; Switch $nMsg1
; Case $GUI_EVENT_CLOSE
;Exit
; EndSwitch
;WEnd
;While 1
; Sleep(10)
; WEnd
;EndFunc ;==>Example
;Func Button1Click()
;While 1
; Func Button1Click()
;EndFunc
;Local $i = 1
;While $i <= 10
;MsgBox($MB_SYSTEMMODAL, "", "Value of $i is: " & $i)
;导入变量=============================================================================
;借款人姓名
$data3 =_Excel_RangeRead($oWorkbook, 3, "H9", 3)
;贷款金额
$data4 =_Excel_RangeRead($oWorkbook, 3, "R9", 3)
;借款人电话
$data5 =_Excel_RangeRead($oWorkbook, 3, "r12", 3)
;经营场所
$data6 =_Excel_RangeRead($oWorkbook, 3, "h13", 3)
;现住址
$data7 =_Excel_RangeRead($oWorkbook, 3, "h14", 3)
;惠农卡号
$data8 =_Excel_RangeRead($oWorkbook, 3, "r15", 3)
;借款人身份证
$data9 =_Excel_RangeRead($oWorkbook, 3, "h16", 3)
;家庭成员姓名
$data10 =_Excel_RangeRead($oWorkbook, 3, "h18", 3)
;房产价值
$data11 =_Excel_RangeRead($oWorkbook, 3, "r24", 3)
;产权人
$data12 =_Excel_RangeRead($oWorkbook, 3, "h25", 3)
;产权人身份证
$data13 =_Excel_RangeRead($oWorkbook, 3, "h26", 3)
;共有人
$data14 =_Excel_RangeRead($oWorkbook, 3, "h27", 3)
;共有人身份证
$data15 =_Excel_RangeRead($oWorkbook, 3, "r26", 3)
;座落位置
$data16 =_Excel_RangeRead($oWorkbook, 3, "h28", 3)
;房产证号
$data17 =_Excel_RangeRead($oWorkbook, 3, "h29", 3)
;产权人电话
$data18 =_Excel_RangeRead($oWorkbook, 3, "r29", 3)
;经营年限
$data19 =_Excel_RangeRead($oWorkbook, 3, "h54", 3)
;水稻亩数
$data20 =_Excel_RangeRead($oWorkbook, 3, "h55", 3)
;农机、设备
$data21 =_Excel_RangeRead($oWorkbook, 3, "y7", 3)
;生物资产
$data22 =_Excel_RangeRead($oWorkbook, 3, "y6", 3)
;经营销售收入
$data23 =_Excel_RangeRead($oWorkbook, 3, "y4", 3)
;经营成本、税费支出
$data24 =_Excel_RangeRead($oWorkbook, 3, "y9", 3)
;其他收入
$data25 =_Excel_RangeRead($oWorkbook, 3, "y5", 3)
;其他支出
$data26 =_Excel_RangeRead($oWorkbook, 3, "y10", 3)
;经营利润
$data27 =_Excel_RangeRead($oWorkbook, 3, "y12", 3)
; 家庭年收入
$data28 =_Excel_RangeRead($oWorkbook, 3, "y3", 3)
; 客户个性描述
$data29 ="客户品德、信誉良好,经营状况正常"
;小额爱理文字
$data30 = "经调查,借款人主体资格符合规定,第一还款来源充足,抵押的房产足值,担保合法有效,同意为其发放农户小额贷款10万元,期限一年期, 利率6.09%,还款方式一次利随本清还款,贷款发放后,初步认定为正常类贷款。"
; 大额爱理文字
$data31 = "经调查,借款人主体资格符合规定,第一还款来源充足,抵押的房产足值,担保合法有效,同意为其发放农村个人生产经营贷款11万元,期限一年期, 利率6.09%,还款方式一次利随本清还款,贷款发放后,初步认定为正常类贷款。"
;
$data32 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data33 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data34 =_Excel_RangeRead($oWorkbook, 3, "", 3)
; 2房产价值
$data35 =_Excel_RangeRead($oWorkbook, 3, "R34", 3)
; 2产权人
$data36 =_Excel_RangeRead($oWorkbook, 3, "h35", 3)
; 2产权人身份证
$data37 =_Excel_RangeRead($oWorkbook, 3, "H36", 3)
; 2共有人
$data38 =_Excel_RangeRead($oWorkbook, 3, "H37", 3)
; 2共有人身份证
$data39 =_Excel_RangeRead($oWorkbook, 3, "R36", 3)
; 2座落位置
$data40 =_Excel_RangeRead($oWorkbook, 3, "H38", 3)
; 2房产证号
$data41 =_Excel_RangeRead($oWorkbook, 3, "H39", 3)
; 2产权人电话
$data42 =_Excel_RangeRead($oWorkbook, 3, "R39", 3)
;
$data43 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data44 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data45 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data46 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data47 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data48 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data49 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data50 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data51 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data52 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data53 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data54 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data55 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data56 =_Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data100 =_Excel_RangeRead($oWorkbook, 3, "H9", 3)
;
$Label2 = GUICtrlCreateLabel($data100, 100, 736, 145, 33)
;GUICtrlSetOnEvent(-1, "Label2Click")
;GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
Func Button1Click()
EndFunc
Func Button3Click()
ClipPut($data3)
EndFunc
Func Button4Click()
ClipPut($data4)
EndFunc
Func Button5Click()
ClipPut($data5)
EndFunc
Func Button6Click()
ClipPut($data6)
EndFunc
Func Button7Click()
ClipPut($data7)
EndFunc
Func Button8Click()
ClipPut($data8)
EndFunc
Func Button9Click()
ClipPut($data9)
EndFunc
Func Button10Click()
ClipPut($data10)
EndFunc
Func Button11Click()
ClipPut($data11)
EndFunc
Func Button12Click()
ClipPut($data12)
EndFunc
Func Button13Click()
ClipPut($data13)
EndFunc
Func Button14Click()
ClipPut($data14)
EndFunc
Func Button15Click()
ClipPut($data15)
EndFunc
Func Button16Click()
ClipPut($data16)
EndFunc
Func Button17Click()
ClipPut($data17)
EndFunc
Func Button18Click()
ClipPut($data18)
EndFunc
Func Button19Click()
ClipPut($data19)
EndFunc
Func Button20Click()
ClipPut($data20)
EndFunc
Func Button21Click()
ClipPut($data21)
EndFunc
Func Button22Click()
ClipPut($data22)
EndFunc
Func Button23Click()
ClipPut($data23)
EndFunc
Func Button24Click()
_ClipBoard_Empty ( )
ClipPut($data24)
EndFunc
Func Button25Click()
_ClipBoard_Empty ( )
ClipPut($data24)
EndFunc
Func Button26Click()
_ClipBoard_Empty ( )
ClipPut($data26)
EndFunc
Func Button27Click()
ClipPut($data27)
EndFunc
Func Button28Click()
ClipPut($data28)
EndFunc
Func Button29Click()
ClipPut($data29)
EndFunc
Func Button30Click()
ClipPut($data30)
EndFunc
Func Button31Click()
ClipPut($data31)
EndFunc
Func Button32Click()
ClipPut($data32)
EndFunc
Func Button33Click()
ClipPut($data33)
EndFunc
Func Button34Click()
ClipPut($data34)
EndFunc
Func Button35Click()
ClipPut($data35)
EndFunc
Func Button36Click()
ClipPut($data36)
EndFunc
Func Button37Click()
ClipPut($data37)
EndFunc
Func Button38Click()
ClipPut($data38)
EndFunc
Func Button39Click()
ClipPut($data39)
EndFunc
Func Button40Click()
ClipPut($data40)
EndFunc
Func Button41Click()
ClipPut($data41)
EndFunc
Func Button42Click()
ClipPut($data42)
EndFunc
Func Button43Click()
ClipPut($data43)
EndFunc
Func Button44Click()
ClipPut($data44)
EndFunc
Func Button45Click()
ClipPut($data45)
EndFunc
Func Button46Click()
ClipPut($data46)
EndFunc
Func Button47Click()
ClipPut($data47)
EndFunc
Func Button48Click()
ClipPut($data48)
EndFunc
Func Button49Click()
ClipPut($data49)
EndFunc
Func Button50Click()
ClipPut($data50)
EndFunc
Func Button51Click()
ClipPut($data51)
EndFunc
Func Button52Click()
ClipPut($data52)
EndFunc
Func Button53Click()
ClipPut($data53)
EndFunc
Func Button54Click()
ClipPut($data54)
EndFunc
Func Button55Click()
ClipPut($data55)
EndFunc
Func Button56Click()
ClipPut($data56)
EndFunc
Func Form1Close()
WinClose($Form1,"")
WinKill($Form1, "")
Exit
EndFunc
Func Form1Maximize()
EndFunc
Func Form1Minimize()
EndFunc
Func Form1Restore()
EndFunc
Func Label1Click()
EndFunc
;$i = $i + 1
;WEnd
;WEnd
;EndFunc ;Button1Click()
看这代码好累,是不是哪里不对 可以直接重建整个窗体,但每次都重新读取全部数据,所以效率上不乐观.#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiToolbar.au3>
#include <ToolbarConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <Excel.au3>
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <Clipboard.au3>
Opt("GUIOnEventMode", 1)
_main()
#region ### START Koda GUI section ### Form=C:\Users\ltxpc\Desktop\C3辅助工具1.0.kxf
Func _main()
$Form1 = GUICreate("C3辅助", 243, 806, 1164, 9)
GUISetState(@SW_SHOW)
WinSetOnTop($Form1, "", $WINDOWS_ONTOP)
GUISetBkColor(0xC0DCC0)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
; 打开电子表格========================================================================
Local $oExcel = _Excel_Open()
If @error Then Exit MsgBox(16, "打开错误: 表格不存在!", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
Local $sWorkbook = @ScriptDir & "\农贷-抵押.et"
Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook)
If @error Then Exit MsgBox($MB_SYSTEMMODAL, "打开错误: 表格不存在!", "不能读取'" & $sWorkbook & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
MsgBox($MB_SYSTEMMODAL, "成功:", "已读取表格中的C3数据" & @CRLF & @CRLF & "Creation Date: " & $oWorkbook.BuiltinDocumentProperties("Creation Date").Value)
$Button1 = GUICtrlCreateButton("刷新数据", 144, 16, 84, 50)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000080)
;Dim $Form2_AccelTable = [["{F5}", $Button1]]
;GUISetAccelerators($Form2_AccelTable)
GUICtrlSetOnEvent(-1, "Button1Click")
$Button3 = GUICtrlCreateButton("借款人姓名", 8, 72, 110, 25)
GUICtrlSetOnEvent(-1, "Button3Click")
$Button4 = GUICtrlCreateButton("贷款金额", 120, 72, 110, 25)
GUICtrlSetOnEvent(-1, "Button4Click")
$Button5 = GUICtrlCreateButton("借款人电话", 8, 96, 110, 25)
GUICtrlSetOnEvent(-1, "Button5Click")
$Button6 = GUICtrlCreateButton("经营场所", 120, 96, 110, 25)
GUICtrlSetOnEvent(-1, "Button6Click")
$Button7 = GUICtrlCreateButton("现住址", 8, 120, 110, 25)
GUICtrlSetOnEvent(-1, "Button7Click")
$Button8 = GUICtrlCreateButton("惠农卡号", 120, 120, 110, 25)
GUICtrlSetOnEvent(-1, "Button8Click")
$Button9 = GUICtrlCreateButton("借款人身份证", 8, 144, 110, 25)
GUICtrlSetOnEvent(-1, "Button9Click")
$Button10 = GUICtrlCreateButton("家庭成员姓名", 120, 144, 110, 25)
GUICtrlSetOnEvent(-1, "Button10Click")
$Button11 = GUICtrlCreateButton("1房产价值", 8, 168, 110, 25)
GUICtrlSetOnEvent(-1, "Button11Click")
$Button12 = GUICtrlCreateButton("1产权人", 120, 168, 110, 25)
GUICtrlSetOnEvent(-1, "Button12Click")
$Button13 = GUICtrlCreateButton("1产权人身份证", 8, 192, 110, 25)
GUICtrlSetOnEvent(-1, "Button13Click")
$Button14 = GUICtrlCreateButton("1共有人", 120, 192, 110, 25)
GUICtrlSetOnEvent(-1, "Button14Click")
$Button15 = GUICtrlCreateButton("1共有人身份证", 8, 216, 110, 25)
GUICtrlSetOnEvent(-1, "Button15Click")
$Button16 = GUICtrlCreateButton("1座落位置", 120, 216, 110, 25)
GUICtrlSetOnEvent(-1, "Button16Click")
$Button17 = GUICtrlCreateButton("1房产证号", 8, 240, 110, 25)
GUICtrlSetOnEvent(-1, "Button17Click")
$Button18 = GUICtrlCreateButton("1产权人电话", 120, 240, 110, 25)
GUICtrlSetOnEvent(-1, "Button18Click")
$Button19 = GUICtrlCreateButton("经营年限", 8, 264, 110, 25)
GUICtrlSetOnEvent(-1, "Button19Click")
$Button20 = GUICtrlCreateButton("水稻亩数", 120, 264, 110, 25)
GUICtrlSetOnEvent(-1, "Button20Click")
$Button21 = GUICtrlCreateButton("农机、设备", 8, 288, 110, 25)
GUICtrlSetOnEvent(-1, "Button21Click")
$Button22 = GUICtrlCreateButton("生物资产", 120, 288, 110, 25)
GUICtrlSetOnEvent(-1, "Button22Click")
$Button23 = GUICtrlCreateButton("经营销售收入", 8, 312, 110, 25)
GUICtrlSetOnEvent(-1, "Button23Click")
$Button24 = GUICtrlCreateButton("经营成本、税费支出", 120, 312, 110, 25)
GUICtrlSetOnEvent(-1, "Button24Click")
$Button25 = GUICtrlCreateButton("其他收入", 8, 336, 110, 25)
GUICtrlSetOnEvent(-1, "Button25Click")
$Button26 = GUICtrlCreateButton("其他支出", 120, 336, 110, 25)
GUICtrlSetOnEvent(-1, "Button26Click")
$Button27 = GUICtrlCreateButton("经营利润", 8, 360, 110, 25)
GUICtrlSetOnEvent(-1, "Button27Click")
$Button28 = GUICtrlCreateButton("家庭年收入", 120, 360, 110, 25)
GUICtrlSetOnEvent(-1, "Button28Click")
$Button29 = GUICtrlCreateButton("客户个性描述", 8, 384, 110, 25)
GUICtrlSetOnEvent(-1, "Button29Click")
$Button30 = GUICtrlCreateButton("小额受理文字", 120, 384, 110, 25)
GUICtrlSetOnEvent(-1, "Button30Click")
$Button31 = GUICtrlCreateButton("大额受理文字", 8, 408, 110, 25)
GUICtrlSetOnEvent(-1, "Button31Click")
$Button32 = GUICtrlCreateButton("", 120, 408, 110, 25)
GUICtrlSetOnEvent(-1, "Button32Click")
$Button33 = GUICtrlCreateButton("", 8, 432, 110, 25)
GUICtrlSetOnEvent(-1, "Button33Click")
$Button34 = GUICtrlCreateButton("", 120, 432, 110, 25)
GUICtrlSetOnEvent(-1, "Button34Click")
$Button35 = GUICtrlCreateButton("2房产价值", 8, 456, 110, 25)
GUICtrlSetOnEvent(-1, "Button35Click")
$Button36 = GUICtrlCreateButton("2产权人", 120, 456, 110, 25)
GUICtrlSetOnEvent(-1, "Button36Click")
$Button37 = GUICtrlCreateButton("2产权人身份证", 8, 480, 110, 25)
GUICtrlSetOnEvent(-1, "Button37Click")
$Button38 = GUICtrlCreateButton("2共有人", 120, 480, 110, 25)
GUICtrlSetOnEvent(-1, "Button38Click")
$Button39 = GUICtrlCreateButton("2共有人身份证", 8, 504, 110, 25)
GUICtrlSetOnEvent(-1, "Button39Click")
$Button40 = GUICtrlCreateButton("2座落位置", 120, 504, 110, 25)
GUICtrlSetOnEvent(-1, "Button40Click")
$Button41 = GUICtrlCreateButton("2房产证号", 8, 528, 110, 25)
GUICtrlSetOnEvent(-1, "Button41Click")
$Button42 = GUICtrlCreateButton("2产权人电话", 120, 528, 110, 25)
GUICtrlSetOnEvent(-1, "Button42Click")
$Button43 = GUICtrlCreateButton("", 8, 552, 110, 25)
GUICtrlSetOnEvent(-1, "Button43Click")
$Button44 = GUICtrlCreateButton("", 120, 552, 110, 25)
GUICtrlSetOnEvent(-1, "Button44Click")
$Button45 = GUICtrlCreateButton("", 8, 576, 110, 25)
GUICtrlSetOnEvent(-1, "Button45Click")
$Button46 = GUICtrlCreateButton("", 120, 576, 110, 25)
GUICtrlSetOnEvent(-1, "Button46Click")
$Button47 = GUICtrlCreateButton("", 8, 600, 110, 25)
GUICtrlSetOnEvent(-1, "Button47Click")
$Button48 = GUICtrlCreateButton("", 120, 600, 110, 25)
GUICtrlSetOnEvent(-1, "Button48Click")
$Button49 = GUICtrlCreateButton("", 8, 624, 110, 25)
GUICtrlSetOnEvent(-1, "Button49Click")
$Button50 = GUICtrlCreateButton("", 120, 624, 110, 25)
GUICtrlSetOnEvent(-1, "Button50Click")
$Button51 = GUICtrlCreateButton("", 8, 648, 110, 25)
GUICtrlSetOnEvent(-1, "Button51Click")
$Button52 = GUICtrlCreateButton("", 120, 648, 110, 25)
GUICtrlSetOnEvent(-1, "Button52Click")
$Button53 = GUICtrlCreateButton("", 8, 672, 110, 25)
GUICtrlSetOnEvent(-1, "Button53Click")
$Button54 = GUICtrlCreateButton("", 120, 672, 110, 25)
GUICtrlSetOnEvent(-1, "Button54Click")
$Button55 = GUICtrlCreateButton("", 8, 696, 110, 25)
GUICtrlSetOnEvent(-1, "Button55Click")
$Button56 = GUICtrlCreateButton("", 120, 696, 110, 25)
GUICtrlSetOnEvent(-1, "Button56Click")
$Label1 = GUICtrlCreateLabel("版本:1.2016.12.26", 6, 36, 130, 17)
GUICtrlSetOnEvent(-1, "Label1Click")
GUISetState(@SW_SHOW)
WinSetTitle($Form1, '', '请稍候,正在载入数据')
GUISetState(@SW_DISABLE, $Form1)
;导入变量=============================================================================
;借款人姓名
$data3 = _Excel_RangeRead($oWorkbook, 3, "H9", 3)
;贷款金额
$data4 = _Excel_RangeRead($oWorkbook, 3, "R9", 3)
;借款人电话
$data5 = _Excel_RangeRead($oWorkbook, 3, "r12", 3)
;经营场所
$data6 = _Excel_RangeRead($oWorkbook, 3, "h13", 3)
;现住址
$data7 = _Excel_RangeRead($oWorkbook, 3, "h14", 3)
;惠农卡号
$data8 = _Excel_RangeRead($oWorkbook, 3, "r15", 3)
;借款人身份证
$data9 = _Excel_RangeRead($oWorkbook, 3, "h16", 3)
;家庭成员姓名
$data10 = _Excel_RangeRead($oWorkbook, 3, "h18", 3)
;房产价值
$data11 = _Excel_RangeRead($oWorkbook, 3, "r24", 3)
;产权人
$data12 = _Excel_RangeRead($oWorkbook, 3, "h25", 3)
;产权人身份证
$data13 = _Excel_RangeRead($oWorkbook, 3, "h26", 3)
;共有人
$data14 = _Excel_RangeRead($oWorkbook, 3, "h27", 3)
;共有人身份证
$data15 = _Excel_RangeRead($oWorkbook, 3, "r26", 3)
;座落位置
$data16 = _Excel_RangeRead($oWorkbook, 3, "h28", 3)
;房产证号
$data17 = _Excel_RangeRead($oWorkbook, 3, "h29", 3)
;产权人电话
$data18 = _Excel_RangeRead($oWorkbook, 3, "r29", 3)
;经营年限
$data19 = _Excel_RangeRead($oWorkbook, 3, "h54", 3)
;水稻亩数
$data20 = _Excel_RangeRead($oWorkbook, 3, "h55", 3)
;农机、设备
$data21 = _Excel_RangeRead($oWorkbook, 3, "y7", 3)
;生物资产
$data22 = _Excel_RangeRead($oWorkbook, 3, "y6", 3)
;经营销售收入
$data23 = _Excel_RangeRead($oWorkbook, 3, "y4", 3)
;经营成本、税费支出
$data24 = _Excel_RangeRead($oWorkbook, 3, "y9", 3)
;其他收入
$data25 = _Excel_RangeRead($oWorkbook, 3, "y5", 3)
;其他支出
$data26 = _Excel_RangeRead($oWorkbook, 3, "y10", 3)
;经营利润
$data27 = _Excel_RangeRead($oWorkbook, 3, "y12", 3)
; 家庭年收入
$data28 = _Excel_RangeRead($oWorkbook, 3, "y3", 3)
; 客户个性描述
$data29 = "客户品德、信誉良好,经营状况正常"
;小额爱理文字
$data30 = "经调查,借款人主体资格符合规定,第一还款来源充足,抵押的房产足值,担保合法有效,同意为其发放农户小额贷款10万元,期限一年期, 利率6.09%,还款方式一次利随本清还款,贷款发放后,初步认定为正常类贷款。"
; 大额爱理文字
$data31 = "经调查,借款人主体资格符合规定,第一还款来源充足,抵押的房产足值,担保合法有效,同意为其发放农村个人生产经营贷款11万元,期限一年期, 利率6.09%,还款方式一次利随本清还款,贷款发放后,初步认定为正常类贷款。"
;
$data32 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data33 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data34 = _Excel_RangeRead($oWorkbook, 3, "", 3)
; 2房产价值
$data35 = _Excel_RangeRead($oWorkbook, 3, "R34", 3)
; 2产权人
$data36 = _Excel_RangeRead($oWorkbook, 3, "h35", 3)
; 2产权人身份证
$data37 = _Excel_RangeRead($oWorkbook, 3, "H36", 3)
; 2共有人
$data38 = _Excel_RangeRead($oWorkbook, 3, "H37", 3)
; 2共有人身份证
$data39 = _Excel_RangeRead($oWorkbook, 3, "R36", 3)
; 2座落位置
$data40 = _Excel_RangeRead($oWorkbook, 3, "H38", 3)
; 2房产证号
$data41 = _Excel_RangeRead($oWorkbook, 3, "H39", 3)
; 2产权人电话
$data42 = _Excel_RangeRead($oWorkbook, 3, "R39", 3)
;
$data43 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data44 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data45 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data46 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data47 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data48 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data49 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data50 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data51 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data52 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data53 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data54 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data55 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data56 = _Excel_RangeRead($oWorkbook, 3, "", 3)
;
$data100 = _Excel_RangeRead($oWorkbook, 3, "H9", 3)
;
$Label2 = GUICtrlCreateLabel($data100, 100, 736, 145, 33)
;GUICtrlSetOnEvent(-1, "Label2Click")
WinSetTitle($Form1, '', '数据载入完毕')
GUISetState(@SW_ENABLE, $Form1)
EndFunc ;==>_main
While 1
Sleep(100)
WEnd
Func Button1Click()
GUIDelete($Form1)
_main()
EndFunc ;==>Button1Click
Func Button3Click()
ClipPut($data3)
EndFunc ;==>Button3Click
Func Button4Click()
ClipPut($data4)
EndFunc ;==>Button4Click
Func Button5Click()
ClipPut($data5)
EndFunc ;==>Button5Click
Func Button6Click()
ClipPut($data6)
EndFunc ;==>Button6Click
Func Button7Click()
ClipPut($data7)
EndFunc ;==>Button7Click
Func Button8Click()
ClipPut($data8)
EndFunc ;==>Button8Click
Func Button9Click()
ClipPut($data9)
EndFunc ;==>Button9Click
Func Button10Click()
ClipPut($data10)
EndFunc ;==>Button10Click
Func Button11Click()
ClipPut($data11)
EndFunc ;==>Button11Click
Func Button12Click()
ClipPut($data12)
EndFunc ;==>Button12Click
Func Button13Click()
ClipPut($data13)
EndFunc ;==>Button13Click
Func Button14Click()
ClipPut($data14)
EndFunc ;==>Button14Click
Func Button15Click()
ClipPut($data15)
EndFunc ;==>Button15Click
Func Button16Click()
ClipPut($data16)
EndFunc ;==>Button16Click
Func Button17Click()
ClipPut($data17)
EndFunc ;==>Button17Click
Func Button18Click()
ClipPut($data18)
EndFunc ;==>Button18Click
Func Button19Click()
ClipPut($data19)
EndFunc ;==>Button19Click
Func Button20Click()
ClipPut($data20)
EndFunc ;==>Button20Click
Func Button21Click()
ClipPut($data21)
EndFunc ;==>Button21Click
Func Button22Click()
ClipPut($data22)
EndFunc ;==>Button22Click
Func Button23Click()
ClipPut($data23)
EndFunc ;==>Button23Click
Func Button24Click()
_ClipBoard_Empty()
ClipPut($data24)
EndFunc ;==>Button24Click
Func Button25Click()
_ClipBoard_Empty()
ClipPut($data24)
EndFunc ;==>Button25Click
Func Button26Click()
_ClipBoard_Empty()
ClipPut($data26)
EndFunc ;==>Button26Click
Func Button27Click()
ClipPut($data27)
EndFunc ;==>Button27Click
Func Button28Click()
ClipPut($data28)
EndFunc ;==>Button28Click
Func Button29Click()
ClipPut($data29)
EndFunc ;==>Button29Click
Func Button30Click()
ClipPut($data30)
EndFunc ;==>Button30Click
Func Button31Click()
ClipPut($data31)
EndFunc ;==>Button31Click
Func Button32Click()
ClipPut($data32)
EndFunc ;==>Button32Click
Func Button33Click()
ClipPut($data33)
EndFunc ;==>Button33Click
Func Button34Click()
ClipPut($data34)
EndFunc ;==>Button34Click
Func Button35Click()
ClipPut($data35)
EndFunc ;==>Button35Click
Func Button36Click()
ClipPut($data36)
EndFunc ;==>Button36Click
Func Button37Click()
ClipPut($data37)
EndFunc ;==>Button37Click
Func Button38Click()
ClipPut($data38)
EndFunc ;==>Button38Click
Func Button39Click()
ClipPut($data39)
EndFunc ;==>Button39Click
Func Button40Click()
ClipPut($data40)
EndFunc ;==>Button40Click
Func Button41Click()
ClipPut($data41)
EndFunc ;==>Button41Click
Func Button42Click()
ClipPut($data42)
EndFunc ;==>Button42Click
Func Button43Click()
ClipPut($data43)
EndFunc ;==>Button43Click
Func Button44Click()
ClipPut($data44)
EndFunc ;==>Button44Click
Func Button45Click()
ClipPut($data45)
EndFunc ;==>Button45Click
Func Button46Click()
ClipPut($data46)
EndFunc ;==>Button46Click
Func Button47Click()
ClipPut($data47)
EndFunc ;==>Button47Click
Func Button48Click()
ClipPut($data48)
EndFunc ;==>Button48Click
Func Button49Click()
ClipPut($data49)
EndFunc ;==>Button49Click
Func Button50Click()
ClipPut($data50)
EndFunc ;==>Button50Click
Func Button51Click()
ClipPut($data51)
EndFunc ;==>Button51Click
Func Button52Click()
ClipPut($data52)
EndFunc ;==>Button52Click
Func Button53Click()
ClipPut($data53)
EndFunc ;==>Button53Click
Func Button54Click()
ClipPut($data54)
EndFunc ;==>Button54Click
Func Button55Click()
ClipPut($data55)
EndFunc ;==>Button55Click
Func Button56Click()
ClipPut($data56)
EndFunc ;==>Button56Click
Func Form1Close()
GUIDelete($Form1)
Exit
EndFunc ;==>Form1Close
Func Form1Maximize()
EndFunc ;==>Form1Maximize
Func Form1Minimize()
EndFunc ;==>Form1Minimize
Func Form1Restore()
EndFunc ;==>Form1Restore
Func Label1Click()
EndFunc ;==>Label1Click
回复 3# lxwlxwayy
目前能运行,只是“刷新数据”按钮不会做,想实现的功能是点击后重新丛表格提取新数据 重刷窗口的效率差没问题,我并不需要频繁重读数据 最好把excel的样式发上来,
我的理解是这样的,在一个excel表格中保存着所有借贷人的姓名,信息之类,然后你点次刷新会读取一个借贷人的信息? 回复 5# ltxpc
你从哪来的代码啊? 似乎一点编程基础都没有的样子.
那是提示全局变量未定义,把下面代码添加到开头的相应位置就行了.
;Opt("GUIOnEventMode", 1)
Global $Form1
For $i = 3 To 100
Assign('data' & $i, '', 2)
Next
;main() 回复 5# ltxpc
你AU3什么版本的?提示信息这么高大上 回复 10# 骗子
应该是隔壁的 没有表格数据,没法做
页:
[1]