Private Sub Command_Click()
Dim conn As New ADODBConnection
Dim rs As New ADODBRecordset
connOpen Provider=MicrosoftJetOLEDB;Data Source=c:axls;Extended Properties=Excel ;HDR=YES;IMEX=
rsOpen select * from [sheet$] conn adOpenForwardOnly adLockOptimistic
Do While Not rsEOF
Print rs()
rsMoveNext
Loop
rsClose
End Sub
HDR和IMEX一定要配合使用HDR表示要把第一行作为数据还是作为列名作为数据用hdr=no作为列名用hdr=yes通过Imex=来把混合型作为文本型读取避免null值