pizixt你好,谢谢昨晚帮我解决了问题了.
现在的问题是能统计了,但排列不能按数字1,2,3,4,5……排列,好像是字符串排列1,10,……,怎么解决?
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_xl_STRING
Rs.Source = "SELECT count(cl_nu) FROM Product group by cl_nu order by cl_nu "
Rs.CursorType = 0
Rs.CursorLocation = 3
Rs.LockType = 1
Rs.Open()
redim rc(Rs.recordcount+1)
if not Rs.eof then
for i=1 to Rs.recordcount
rc(i)=Rs(0)
Rs.movenext
next
end if