var cy;//创建StringBuilder对象 var strSqlc =newStringBuilder();//学生ID varNIANDU1=getObj('txt4');//全局变数 var excelDataBean =null;//局部变数 var sheeBean =null;//excel印刷 var excelPrint =getExcelPrint();var rowDataList =null;var row =null;try{
//追加SQL语句
strSqlc.append("SELECT XUESHENGID,STUDENT_FULL_NM_KN,XINGBIE,STUDENT_SUBJECT,CHENGJI FROM M_STUDENT1 ");
strSqlc.append("where 1 = 1");//判断ID if(NIANDU1!=null&&NIANDU1!=""){
//追加SQL语句
strSqlc.append(" AND XUESHENGID = '").append(NIANDU1).append("'");}//按ID排序
strSqlc.append(" ORDER BY XUESHENGID ");
cy =