在VB中使用数据库打开EXcel文件,通过下面的代码获得它的工作表时,内容与实际工作表不一致?高手请进.
1ssp 2006-03-20 09:58:44 Set RsTable = cnExcel.OpenSchema(adSchemaTables)
Do Until RsTable.EOF
Debug.Print "Table name: " & _
RsTable!TABLE_NAME & vbCr & _
"Table type: " & RsTable!TABLE_TYPE & vbCr
RsTable.MoveNext
Loop
RsTable.Close
问题是:有的EXECL文件没有问题,有的EXECL文件会出现下面的情况:
Table name: 滨洲市$
Table type: TABLE
Table name: 滨洲市$_
Table type: TABLE
Table name: 荷泽市$
Table type: TABLE
Table name: 济南市$
Table type: TABLE
Table name: 聊城市$
Table type: TABLE
上面出现了两次滨洲市,事实上只有一个"滨洲市"工作表.
急用,谢谢