作为技术探讨,这题目很好。
作为解决问题,直接打一张A4纸,把另外的7张撕了,留下需要的那一张就可以了。
作为解决问题,直接打一张A4纸,把另外的7张撕了,留下需要的那一张就可以了。
只求每天有一丁点儿的进步就可以了
Clear Create Cursor T (准考证号 C(12),姓名 C(8),性别 C(2),报名点 C(20),班级 C(20),考试科目1 C(10),考点1 C(20),考场1 C(4),坐位1 C(6),考试科目2 C(10),考点2 C(20),考场2 C(4),坐位2 C(6)) cStr=Strconv(Filetostr("1.txt"),6) I=0 For lnI=1 To Alines(Ab,cStr,Chr(13)+Chr(10)) Do case Case "准考证号"$Ab[lnI] I=I+1 =Alines(A1,Ab[lnI],"准考证号") Zkzh1=A1[2] Zkzh2=A1[3] Case "性别"$Ab[lnI] I=I+1 =Alines(A2,Ab[lnI],"姓 名","性别") Xm1=A2[2] Xm2=A2[4] Xb1=A2[3] Xb2=A2[5] Case "报名点"$Ab[lnI] I=I+1 =Alines(A3,Ab[lnI],"报名点") Bmd1=A3[2] Bmd2=A3[3] Case "班 级"$Ab[lnI] I=I+1 =Alines(A4,Ab[lnI],"班 级") Bj1=A4[2] Bj2=A4[3] Case "历史"$Ab[lnI] I=I+1 Kskm1="历史" =Alines(A5,Ab[lnI],Kskm1) Kdmc1=Chrtran(A5[2],"0123456789","") Kc1=Strtran(A5[2],Kdmc1,"") Kdmc2=Chrtran(A5[3],"0123456789","") Kc2=Strtran(A5[3],Kdmc2,"") Zw1=Left(Ab[lnI+1],6) Zw2=Right(Ab[lnI+1],6) lnI=lnI+1 Case "地理"$Ab[lnI] I=I+1 Kskm2="地理" =Alines(A6,Ab[lnI],Kskm2) Kdmc11=Chrtran(A6[2],"0123456789","") Kc11=Strtran(A6[2],Kdmc11,"") Kdmc21=Chrtran(A6[3],"0123456789","") Kc21=Strtran(A6[3],Kdmc21,"") Zw11=Left(Ab[lnI+1],6) Zw21=Right(Ab[lnI+1],6) lnI=lnI+1 Endcase If I=6 I=0 Insert Into T Values (Zkzh1,Xm1,Xb1,Bmd1,Bj1,Kskm1,Kdmc1,Kc1,Zw1,Kskm2,Kdmc11,Kc11,Zw11) Insert Into T Values (Zkzh2,Xm2,Xb2,Bmd2,Bj2,Kskm1,Kdmc2,Kc2,Zw2,Kskm2,Kdmc21,Kc21,Zw21) Endif Endfor Browse