各位老大,有个问题请教
各位版主,教授,大家好我的一个抓取excel数据的程序的循环中,使用select 命令,每一轮循环都会弹出一个临时表,需要我手动关闭它,才能继续循环。
请问,这个我该加什么代码来维持正常循环
代码如下
for i=2 to nrows step 1
if used('hacfhzl') then
select hacfhzl
else
select 0
use hacfhzl
endif
m1=myexcel.cells(i,1).value
m2=myexcel.cells(i,2).value
m20=myexcel.cells(i,20).value
m4=myexcel.cells(i,4).value
m5=myexcel.cells(i,5).value
m6=myexcel.cells(i,6).value
m7=myexcel.cells(i,7).value
m8=myexcel.cells(i,8).value
m9=myexcel.cells(i,9).value
m10=myexcel.cells(i,10).value
m11=myexcel.cells(i,11).value
m12=myexcel.cells(i,12).value
m13=myexcel.cells(i,13).value
m14=myexcel.cells(i,14).value
m15=myexcel.cells(i,15).value
APPEND BLANK
REPLACE contractda WITH date(),stuffname with m20,agentname with m2,invcmpy with m4,pdt with m5,spec with m6,qty with m7,price with m8,daddress with m10,dname with m11,dphone with m12,iaddress with m13,iname with m14,iphone with m15,pvalue with qty*price
rcn=recno()
repl ordercode with str(rcn)
sele stuffno as num from stuffinfo where stuffinfo.stuffname=hacfhzl.stuffname
repl hacfhzl.stuffno with num