i succed in query number of rows in excel file, but i can't make a query on certin column, or get the value of certin column ,
this is the code i have
Const adOpenStatic = 3 
Const adLockOptimistic = 3 

filename = "D:\temp\rbsupport\final\file.xls" 
Set cn = CreateObject("ADODB.Connection") 
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filename & ";Extended Properties=Excel 8.0" 

query = "Select count(*) as cnt from [internal$A4:B9] " 
Set rs = CreateObject("ADODB.Recordset") 
rs.Open query, cn, adOpenStatic, adLockOptimistic 

Do Until rs.EOF 
  WScript.Echo rs.Fields.item(0) 
  rs.MoveNext 
Loop
what do i need to change to make a group by on certin columns, or just to make a select on certin columns
thanks
Peleg