if smonth<>1 and smonth<>7 then
select * from hz_w_c where ... into curs tempitem
else
select * from hz_w_c into curs tempitem
itemnum=28
endif
SELECT tempitem
R=2
C=5
GOTO TOP
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(2,1).VALUE='***'
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(2,2).VALUE='***'
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(2,3).VALUE='***'
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(2,4).VALUE='***'
FOR I=1 TO itemnum
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(R,C).VALUE= tempitem.citem
if C<=w_num+5 then
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(C-3,1).VALUE='*****'
MYEXCEL.ACTIVEWORKBOOK.SHEETS(1).CELLS(C-3,3).VALUE='*****'
endif
C=C+1
ENDFOR
thisform.text3.value= "正在转换:"+gtfile
use >file alias tempf
select tempf.* from tempf,hz_w where tempf.ye=syear and tempf.mon=smonth and tempf.rsname=hz_w.rsname into curs temp1
sele hz_w
select rsname from hz_w into curs tempn
go top
for K=1 to w_num
select temp1
select tempitem
*到了这一步,出错,提示找不到别名'tempitem'
......