可以用嵌套循环外行内列
Dim iPage,col
With Response .Write "<table>" For iPage=0 To rs.PageSize .Write "<tr>" For col=0 To 4 IF rs("abc")<>"" Then .Write "<td>"&rs("abc")&"</td>" End IF rs.MoveNext IF rs.EOF Then Exit For Next .Write "<tr>" IF rs.EOF Then Exit For Next .Write "</table>"
End With