Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Excel Issue using ADO method

Status
Not open for further replies.

pigpig504

Programmer
Joined
Sep 8, 2003
Messages
11
Location
HK
Dear all,

I've encounter reading Excel data problem.
When I read through the Excel document, NULL' is return somtimes(but there should be data at those particular cells, yet, I do can get some of the data at some other cells)

My code is as follows:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & TmpFile & ";" & _
"Extended Properties=""Excel 8.0;"""

cn.ConnectionString = ConnectionString
cn.ConnectionTimeout = 240
cn.CommandTimeout = 240
cn.Open

RS1.Open "SELECT * FROM [Sheet1$]", CN1, adOpenDynamic, adLockReadOnly

where cn is the adodb.connection and RS1 is the adodb.recordset.

Anyone can help??? Many thx!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top