read excel

A

ash

i use the following code to read excel
Set ExcelConn = Server.CreateObject("ADODB.Connection")
Set ExcelRS = Server.CreateObject("ADODB.Recordset")
......
sSQL = "SELECT * FROM [Sheet1$]"
set ExcelRS = ExcelConn.Execute(sSQL)

it work fine for those cell that contained string , but once the cell is numeric, i cant get anything in the cell. How can i solve this problem.

many thx
 
R

Ray Costanzo [MVP]

Try adding "IMEX=1;" to your connection string. If you're not sure how or
where, post your connection string and I'll modify it for you.

Ray at work

i use the following code to read excel
Set ExcelConn = Server.CreateObject("ADODB.Connection")
Set ExcelRS = Server.CreateObject("ADODB.Recordset")
......
sSQL = "SELECT * FROM [Sheet1$]"
set ExcelRS = ExcelConn.Execute(sSQL)

it work fine for those cell that contained string , but once the cell is
numeric, i cant get anything in the cell. How can i solve this problem.

many thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top