ai = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&xlsPath&";Extended Properties=Excel 4.0"
bi = "Select "&fieldName&" from ["&oSheetNam&"$] group by "&fieldName Set conn = CreateObject("ADODB.Connection")
conn.Open ai
Set rs = CreateObject("ADODB.Recordset")
rs.Open bi,conn
因为要查询的fieldName变量中带有(),会被当作函数处理,这种情况该怎么处理?我在fieldName前后都加过双引号,但是好像SQL语句没有识别。请高手指点迷津!